Try this
- Name the part you appreciated, then state the mismatch specifically: timing, format, item or amount.
- Offer a future preference if you know one, without promising to keep or use something you do not want.
A worked example
“Thank you for thinking of me. Surprise visits are difficult during work; a message to choose a time would fit much better.”
An invented example to adapt, not a real exchange or a script you have to follow.
Before you leave it here
Avoid saying the gesture was perfect merely to end the conversation. A clear preference can prevent the same uncomfortable situation from being repeated.