Twice, in the last month, I've had to stop, turn around, go back, and say to a person:
"You know, I'm sorry ... when you did that, I THOUGHT 'thank you' but I forgot to say it out loud. Thank you."
It's kinda embarrassing.
I'm pretty sure that your returning to do so, and in these times even being the sort that "thank you" and "please" still mean something to trumps your having overlooked actually saying the words at first chance. ;)
It's never embarrassing to say thank you, and never too soon or late to say or think the words.