It's one thing to be at the low end of the totem pole, where anonymity and insecurity force you to hedge against the possibility of suddenly losing your job. But once you clear all that and find a bit of professional success, you're still not necessarily secure.
So you have to extend this hedging behavior further out. Keep building your skills, expand into other fields so that you are more employable. Complacency will put you into this position eventually, it's just a matter of time.
Don't leave a secure position to take one with more earning potential but less security. Constantly keep building bridges at your current job and don't give them a reason to fire you.
Above all, try not to hate your job. You may find 5 years down the road that it was the best thing you had going for you. As nasty as the work world can get, it's better than not working.