You need to apply within 28 days before the expiration of your Visa. The Home Office knows the day you call for booking either by telephone or online. Due to the fact that applications are too many, you might be booked to a space after your visa has expired. ItĀ happens most times but don't worry, the HO understand the situation as it is their fault, not yours. It is never a problem at all.