I am 38. I feel as sharp as ever. I have two kids as well. I don't have any earth shattering advice for you. Keep hacking. As a consultant for the last ten years I think this may be our sweet spot in our 40s and 50s. The pay is great. People listen, even young startups. We can leverage our experience. It isn't perfect, but ageism is a zero factor in my world and I enjoy computers as much as I ever did. We (myself and two partners) have slowly grown a consulting company to almost 15 employees over the last 5 years. I have never been as rewarded and actually humbled in my career spanning almost 20 years. Work with people you like, stay curious and keep at it. Not much else to do :)
edit: and teach your kids curiosity... So many kids stare at screens and seem to lose the spark I think I had at their age. Pardon my navel gazing.