You could try an ACT response (which is a form of CBT). I found it really helped with craving snacks in the evening! The more you practice it, the easier it becomes.
Say the following to yourself whenever you experience cravings/urges in the office.
"I’m noticing a strong urge/craving.
My brain is telling me the ‘office snacks’ story again. (No judgement, just observation.)
I don’t need to silence it or obey it.
I can let it be while I choose the action that aligns most with my values. (What action moves me towards the person I want to be?)"
ACT teaches expansion, allowing the uncomfortable feeling to exist without trying to get rid of it. The urge becomes background noise rather than a command.
ACT doesn’t promise a future where food noise disappears. It promises a future where food noise no longer controls you.
The goal isn’t to eliminate wanting. It’s to build the skill of choosing your actions even when wanting is present.
If you want to learn more, I can recommend, The Weight Escape: Stop fad dieting, start losing weight and reshape your life using cutting-edge psychology, which applies ACT to losing weight. https://amzn.eu/d/0bgpCmWU
I lost a stone using the book and calorie restriction/ healthy eating.