I won't reiterate what everyone above has said. You sound like you have a solid background and a level head. 40 still leaves room for a 25 year career at a 121 carrier. Translation = you are not too old.
For all its faults 121 flying is a pretty good gig, especially if you can make it to one of the better companies. You already know the drill, but consider moving to base immediately when you make it to your final destination - commuting your first year, likely junior on reserve (with a young kid) is not a pleasant way to spend your probationary year.
With the massive retirement wave that is coming, there will be some pretty good movement, and if you can get in on the front end of the wave you stand to have an excellent career even starting at 40.
If you decide that it's what you want, then get started yesterday with your networking. Most of us have played the game and are only too happy to help out guys trying to do the same thing. Never hurts to ask for help...
Finally, anything you can do to make yourself stand out in the resume stack or to an interviewer is a good thing. Start now! For example Delta loves Habitat for Humanity volunteers - get involved, even if it's only once a month or whenever you can. Find out what your target airlines want beyond a flying resume. That will be your biggest challenge at 40. They know you can fly. They will want to see how else you can impress them.
Best of luck