The good news is, you learned that you need a blowoff hose early in your brewing career! Instead of an airlock, run a sealed 3/4" hose from your fermenter into a basin or jar with enough water/sanitizer in it to cover the bottom over your hose. After primary fermentation is complete, proceed with your airlock.
It could be contaminated, or it's probably fine. That beer was obviously pumping out some CO2 if it blew the lid off your bucket. It very well could have prevented any contaminants from entering your beer.