I'll give you advice that is a little bit different, but only if you are a top performer. Aggie00 is spot on that you should be prepared to walk. Set up a meeting with your boss, tell them you were approached for another position and that you decided to talk with the potential employer and were surprised with a very generous offer. Say that you like your current company but would like to earn market value for your labor, as evidenced by your external offer. Have a discussion around what you want to achieve, you don't want to be punished in future opportunities / comp by looking outside, but you feel strongly that you're worth more. See where it leads. Their reaction will tell you if you should accept the other offer.
If you aren't a top performer, don't bother. Either swallow it or move on. All of that said, you looked outside for a reason, would a 30% increase keep you happy? If the new job has better trajectory, why wait?