As another veteran of military inspired bodily abuse, I have to agree with amphibian. Pay attention to your body.
I'm coming up on 40 hard and fast and I hit the gym 6 days most weeks and 7 some. I also do a lot of other physical stuff and do not have a sedentary job. I see a lot of guys my age (and yours as well) who basically have one foot in the grave.
Training keeps me moving relatively pain free despite a lot of previous abuse injuries. I'm also still seeing gains in size, strength and body composition, despite being desperately over the hill and past my "prime".
The best advice I can give for training longevity is to train with good form, don't lift too much too soon, have a good spotter, and know that some days are going to be better than others.
The smarter/wiser you are the more productive your training will be.