You need to bathe in youth from time to time in order to experience it - it's fantastic.
Of course you need to keep up to date, try to use your wisdom to understand which technology/language is going to survive the test of time.
For example, C/C++ is going to stick around for a while; make sure you're up to date (C++ 14 and C++ 17).
Pick technologies with a steep learning curves, don't try to compete with 20-year olds doing Javascript Bootcamps - go five steps deeper.
Broaden your horizon - read poetry, listen to all kinds of new music, watch experimental movies, travel around, talk to foreigners, eat weird food.
Study physics and philosophy, psychology and economy.
Have lots of sex - your wife will love you again :)
You have kids ? Great! Learn from them - everything. Try to teach them what they study at school - see if you can figure out a better explanation. Notice how much new stuff you learn about the subject, about yourself and your kid!
We're all getting old(er) every day - as we age this process seems to accelerate - and one day we will be no more.
But inside us lives the kid, the 20-year old, the 30-year old. It's still there, it can still be crazy and fun, we just need to remember to go on a date with our younger selves. All the rest will follow.
At least that's what I'm telling myself :)