Two points to make here :
Firstly, the time from expiry within which you can renew a JAR certificate, both classes 1 and 2, is not 90 days, but 45 days.
Secondly, you will find that you will get no allowance whatever for unexpired class 2 time when you go to LGW for an initial class 1. For that purpose, you are treated as if it is your first ever medical !
The new class 1, assuming you pass it, will, of course, be valid for class 2 privileges after the class 1 expiry date, which will be 12 months from the date of the medical. (class 2 validities 5 years in 20's, 2 years in 30's and 40's ).
Best of luck with initial in August !