I have seen that some people, whose application took a long time to process and their medicals were about to expire, were able to request an extension from IRCC for the validity of the medical exam.
So that could be an option for you but all depends on your exact situation.