You can [with "a" in front of chance ]. It might be better as The masked men waited for the guard to go for their lunch before they had a chance to rob the shop .
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.