Dozens of workers had been stuck inside the illegal gold mine since Monday, after its narrow shaft flooded.