I worked at a startup for the last 4.5 years which had a lot of older (40-50 yr) people (the founders were in their late 40s). I also interviewed a lot of older people (both with positive and negative feedback). What I noticed is two clear groups:
One set of older devs have been in the tech industry just because they needed a job and have somehow kept up with the technologies in a reactive manner. This set of people have mentality of "this is how we used to do this back in 19xx/20xx". It doesn't always work out.
The other set of people are genuinely interested in technology and proactively seek new things, present papers, blog about stuff, and are always on the look out for the next improvement and the next thing. This set of people tend to learn from their own experiences and improve on things while providing guidance to devs in their 20s/early 30s. This set of people never have trouble finding jobs.
The bottom line is that the tech industry requires you to do continuous learning and be enthusiastic about stuff. If you can't do that you'll have trouble finding jobs when you're older.
Edit: I’m seeing the same pattern at my current job even though the percentage of older devs is lower here.