I am very new to the forums but ive come across this problem already. My fermentation was strong enough to completely blow my airlock off my carboy leaving it exposed for almost a whole day and it came out great. So i dont think you have to worry about contamination or throwing your batch out. Best advice i got was a blowoff tube. Replace your airlock with a short length of extra vinyl tubing place one end in the stopper and the other into a bowl or other vessel filled halfway with water and sanitizer that way any blowoff will go safely into your bowl. No fuss no muss.
Sanitize bung and airlock, replace, refill and see what happens. Most likely you are fine. RDWHAHB, just wait it out, you've already done the hard work!!