Ancient Greeks called the life period when one is about 40 "akme". It is a period of greatest mental skills (can't find it on English Wiki, but here is German: https://de.wikipedia.org/wiki/Akme).
The "I'm 30, so I'm to old" syndrome is a consequence of very natural social phenomenon - society wants one to be well defined and established, easy to predict.