You have to file H1 extension before expired date and then you have half year to work for your company after the expired date