It's not unusual for the impression (cast) material to be overfilled in the tray and cause gagging. Let them know what happened last time (and that it was traumatic) and they'll be more careful about how they press it up to the roof of your mouth, and they'll let you tip your head forward a bit so you don't feel like you're going to drown in the putty. Have them make sure they are using a small enough tray, too. If it is overlarge, even the tray itself can be gag inducing. They should try the empty tray before filling it; remind them to just in case they don't think they need to. Just remember, it will not hurt you, it's just incredibly awkward feeling and it will be over in a very short time! (30-60 seconds per tray with modern impression putty). You can withstand almost anything for 60 seconds if you know it will be fully over.
40 is absolutely not too old for braces. They might take a little longer and you have a slightly higher chance of having some tooth roots that have fused to the jaw bone (happens more with age), but if they find any of those they can still work with it. Make sure you've seen your regular dentist recently and gotten x-rays and any potential weak spots addressed. Tugging on the shell of a weak tooth is a recipe for disaster. If you haven't been to a dentist in 20 years, you will need your teeth scaled (tartar removed) and an exam to verify that there are no weaknesses or sensitive spots under the gum or the accumulated tartar.