There's a waiver for just about everything. If you're wanting to go back in as a SWO, probably not going to happen. If you're looking at joining one of the staff corps (especially I think engineering or medical right now), probably a higher chance. Talk to a recruiter. I personally wouldn't want to have to go through OCS at 40 though. Direct commission though, that's not bad at all.