You can file I-90 in advance up to 6 months before your green card expires. You can leave US after you get the I-90 receipt notice and do the fingerprinting (sometimes you may not need to do it because USCIS may just use your old fingerprints-USCIS will let you know that).
The I-90 Receipt Notice is the proof of green card extension for two years before you get the renewed green card, so you can use it and use the old green card to travel within two years. See:
USCIS Extends Green Card Validity Extension to 24 Months for Green Card Renewals | USCIS