The actor was 29 when he began dating Lovato, who was 17 at the time.
Lovato explained the lyrics in an Apple Music interview, saying "the song says it all."
"When I turned 29, I remember I was on vacation and I just realized I'm 29 now, and it put things into perspective. It put everything into perspective," Lovato said. "And I'm very careful with the way that I answer these questions because I feel like the song says it all. I don't have to say too much, to be honest, but turning 29 was a huge eye opener for me. And then, going into treatment and having realizations led to my transformation, my release of the emotion that was put into this song."
The lyrics include: "Finally twenty-nine / Funny, just like you were at the time / Thought it was a teenage dream just a fantasy / But was it yours or was it mine? / Seventeen, twenty-nine."
The song goes on to apparently reference Valderrama (now 42) and his wife, Amanda Pacheco, who is 30.
Lovato sings, "I see you're quite the collector / Yeah, you're twelve years her elder / Maybe now it doesn't matter / But I know f—ing better."
In the interview, Lovato added there was a lot of "anxiety" about releasing the song.
"I just said, 'I have to go for this. I have to own my truth,'" she said.
™ & © 2022 Cable News Network, Inc., a Warner Bros. Discovery Company. All rights reserved.