I'm sure this isn't news for those who are on long-hauls all the time — I earn on 95% North America travel and spend — but here goes: if you have a SWU that's expiring before your date of travel, you can certainly apply it, but if the upgrade does not clear before SWU expiry, and clears after, the upgrade will be revoked day of travel.
I found this out the hard way. Applied a SWU expiring Jan 16 back in December for Feb 21 departure NRT/DFW. UG cleared the night before departure. Hooray! AA calls me at 0600 day of departure: "Hey your upgrade instrument isn't valid, how do you want to support this?" "Your system upgraded me on an invalid SWU?" "Yes, it's a bug. Pay up or go sit in the back." "How is this my problem?" "It isn't, but here we are." OK, so 25,000 miles and $350 later, I had my upgrade. AAgent was super-nice and sympathetic, but what a way to wake up... at least I got the UG in the end.
So just FYI. Fix this bug, AA. This is your problem, not mine.