two thoughts:
1) to echo another contributor, universities and other not-for-profits seem to be much friendlier to aging workforces - startups and even established companies are not
2) avoid going into product management; stay with coding and learn the latest frameworks; product management is brutally tough on aging workers