That is not possible. You can however increase the chances of being the last to go in a lay off and that is by becoming the best at what you do. Work harder, smarter and become more of an asset than a liability. It's either that or marry the bosses son or daughter.