I've been working as a contractor for the last few years, so have experience of several companies. All have them have employed people over 40 and 50, some also over-60s, in all kinds of roles including writing code and management. Generally, their experience in delivering software is invaluable, regardless of technologies used.
People online tend to under-estimate how many people over 30 are involved in tech, for the simple reason that they tend not to use social media as much.
If you're talking specifically about your current job, then maybe they expect career progression to mean moving to management. Talk to your line manager to see what the coding career path is - if there isn't one then maybe you might have to consider finding another job at a place which does have coding career paths.