Check out this thread.
Upgrading Separate Itineraries
I recall doing this a long time ago but can't remember details. I usually do it all at the gate by getting them to note that U/G was lifted or to get them to not lift upgrade and get it on the next leg.