Close the lid of unsealed jar with pop-up lid
After a couple of hours it will be unsafe if it was below 140 °F/60 °C during that time.

Even if you resealed it, it wouldn't "undo" the bacterial growth that occurred during the time it was unsealed.  So, no, it would not be safe to do this even if you could.