It's hard to say without knowing when this happened. If it happened early in the fermentation it's more of a problem. After a few days it's not good to get that hot but it'll probably be OK. How good the beer turns out depends on the strain some will take hot temps better. Regardless DO NOT THROW IT OUT.