It's inevitable that if you keep doing the same thing year after year, you reach a peak value to your company and to your industry as a whole. At the 20 year mark, adding another 10 years of the same thing to your resume isn't going to see your salary grow the same rate it did in the first 10 years. At some point, if you ain't willing to branch out or change roles, you'd just better be happy with cost of living increases and maybe the odd bonus.
On the other hand, you might pick a specialization that goes through a desperate skills shortage and you can cash in - this site has a few people who've found themselves at the 10+ year point in their career and find themselves in great demand.
My advice is that staying a mech engineer all your career should be done because you like the job, not because you want to get rich. If money's your goal, start now and you could be a hedge fund manager in 10 years.
Moral - if you must bang your head against a brick wall, find a wall you like.
LewTam Inc.
Petrophysicist, Leading Hand, Natural Horseman, Prickle Farmer, Crack Shot, Venerable Yogi.