I did this once, and it took quite a long time to recover. I had a very high-paying, fun, and relatively easy job for years, but in that job I was not learning any new skills, tools, etc. Then one day when talking with some dev friends, I realized that not only was I just not keeping up with things, my skills as a developer were actually getting actively worse.
So I had to quit as an act of professional self-preservation. It took years to catch back up again, but in hindsight, leaving that job was the best thing I could have done. I should have done it years before I did.
My cousin has been at the same job for almost 10 years. He's using technology that has been phased out and abandoned by most companies for almost as long (a software developer).
He's also 55 and hasn't spent any time outside of work learning anything new. His problem is that he gets comfortable with a job and doesn't ever want to change, because it's difficult (doesn't want to go on interviews, likes the routine, etc).
Now, he's basically trapped at this job and hopes every day that he doesn't get laid off.
So I had to quit as an act of professional self-preservation. It took years to catch back up again, but in hindsight, leaving that job was the best thing I could have done. I should have done it years before I did.