It's upgraded by. The upgrade must take place before the expiry date. If you book the flight on March 25, call to make an upgrade on March 27, and the upgrade is put on a waiting list and the actual upgrade clears on April 2, it's not valid. The actual upgrade must take place before March 31.