I think it is more sincere if it is just in the moment you know? But having at least some idea of what you are going to say would probably be a good idea. That way you won't just stand there speechless if nothing comes to you on the spot.
I'm sorry I suck at this. I hope it helped a little though.