This is essentially a negotiation, and I can't distill all of negotiation theory into a few hundred words, but here's a bit of advice.

Two (and a half) things:

1) This is more of a "how to approach the conversation" piece of advice... Don't ask for a raise. Tell them it's time for a raise. There's a small distinction here, but it boils down to power dynamics. If you ask for a raise, you're essentially making yourself powerless before their mercy. Instead, frame it not as a request but as an acknowledgement. "I've worked here for X years, I've accomplished A, B, and C projects. I've mentored Y engineers. It is time to discuss compensation adjustments to acknowledge my contributions to the company and my own growth as a team member. Based on market rates, a reasonable raise would be N% or $M dollars."

Be calm. Be respectful. Be firm. This should not be an adversarial conversation. You are both working together to figure out how to reach an agreement that provides mutual benefits to both sides. Be open and honest with your facts. You aren't asking them to do anything unreasonable, you are simply updating their priors about the value that you have to the business. Don't use words like "I think" or "I believe" or "I feel". Just state facts. If they push back, you can counter with more facts or by restating the facts. State your facts and then wait for them to respond. Use awkward silence to your advantage.

2) One thing you'll need to understand what your BATNA is. BATNA stands for "Best Alternative To No Agreement." In other words, let's say they refuse. What are your alternatives? You have another job offer. So if they refuse, you can quit. That's a pretty strong position to be in.

(Side note: I would not bring up the offer until they refuse, though. You don't want them to think you were looking around if you wind up staying. But if they decline to give you a raise, you should bring it up as leverage. That said, if they decline and you bring it up and they then give you the raise, you are now in an awkward position where they now view you as a flight risk and it may be worth keeping you around until they can hire a replacement, and... well, that's not good. Something to think about.)

But let's say that you actually don't want to accept that offer. What happens if your boss refuses to give you a raise? Are you just going to smile and say thank you and suck it up and stay? What are your alternatives? Could you keep this job but just come in a little later and leave a little earlier so they don't notice but you get some more time back in your life? Can you work on cooler projects? I don't know what this best alternative might be, but this is worth thinking about. What's the BEST alternative that you have... and then never accept any less than that.

It's also worth considering your employer's BATNA. What's their best alternative if you quit? They'll have to hire someone else. How much will that cost them, in money spent, time, and opportunity costs? Probably more than it would cost to give you a raise and keep you happy. It would be far cheaper and easier to give you an extra 10K than to spend weeks or months hiring someone new. (One of the keys to negotiating is to figure out your own strategy -- and also try and figure out what their strategy would be!)

bonus thing 2.5) Make sure you also do the above negotiations with the new offer! Your BATNA for the new offer is "I already have a nice job and I just got offered a raise"! You now have agency and power with the new company, and you can go back and say "Hey, you offered me $X, but based on market rates and my skill sets, updating the offer to $X+15K + Y more vacation days would cause me to stop looking around and sign right now." If they decline to move on that (they'll move a _little_, I'm sure), then you can either accept the already-better-than-your-current-job offer, or you can decline and stay where you are. You're in a safe position here! Worst case scenario, you keep your current job, which you seem fine with!

For more reading on negotiating salary (applies to raises as well), I can't recommend patio11's blog post enough: https://www.kalzumeus.com/2012/01/23/salary-negotiation/