On Scorpion Season 4 Episode 15, Toby tells Paige that he needs to stay behind because he injured his back making love to Happy, but that's nowhere near the truth. He needed to stay behind to help Amy get her identity back.
Yup, lying about spending time with your ex-fiancée is the path Toby chose to take. He's not the smartest one in the bunch, but he feels like he owed Amy a debt, so he agrees to dive back into his gambling past to find who purchased Amy's identity.
Meanwhile, Team Scorpion is working a case in Mexico, patching cracks in a reactor that were created when an earthquake hit. Sly manages things from the garage while the rest of the team is on the ground in Mexico.
This job turns out to be tougher than the team thought when another earthquake strikes off the coast, creating a tsunami that headed straight their way. There's not enough time to evacuate the town, so instead, Team Scorpion has to stop a tsunami.
They've done crazier things.
Toby and Amy manage to find the person who has Amy's identity, but that guy is not a fan of Toby's at all. Toby owes the guy a lot of money, and so instead of taking a deal and giving Amy her identity back, the guy puts Toby and Amy in a casket (not a coffin) and intends to bury them alive.
Team Scorpion creates an avalanche that turns the tsunami into a weenie wave, as Happy calls it. Since the mission is done, Happy can get on to the real task at hand: kicking Toby's gooty.
You see, Sly may have mentioned that he saw Toby and Amy drive off together, and it doesn't make matters any better when Toby rejects all of Happy's calls. Luckily for Toby, Happy tracks his keychain and gets his location.
Toby and Amy are rescued, but not before there's a kiss in a casket. Luckily for Toby, Happy was never worried that he would cheat on her with Amy; she was concerned that he would start gambling again.