1. Find an offer that you think is fair to your value. 30k or whatever as long as you can find one then its not too high. Take the offer to your company as a proof that you have been vastly underpaid which they should already know. Take the counter offer and retain the superior benefits. But like I said its hard to find a job beyond 25% increase and HR usually wont make a counter offer of more than 20% unless you are totally a rockstar. Most people make a move for 10 to 15%.
2. Settle for a smaller increase and get already to move again after a year if pay isn't raised to your favor. Rinse and repeat until you can hit a raise anymore. There are some very talented people who get screwed by not doing this and settle for a moderate annual raise.
3. Go freelance or have your own business. Some freelancers make a killing (making the same salary with 6 month off) and not having to put up with corporate bullshits because they know they are talented enough to get another gig very soon.
This is purely speaking from chasing after money. In my opinion, company culture and a boss that appreciate your work are also very important.