I have no experience of this, being only 23, but I do quite often see adverts in Flight International with max. age 56, I guess to get people retiring from BA or the RAF. I know this is with considerable experience, but I hope it will show you that if some companies are willing to hire people at that age, then you certainly shouldn't be worried at 31. After all, even with the airlines with the youngest retirement age, such as BA, at 55 (IIRC), then you would still have over 20 years of good service to offer.
If it's what you want to do, then I'm sure you will succeed, good luck.