If Coffin Queen leaves the battlefield before its ability resolves, the delayed trigger condition can never be fulfilled, so the creature will not be exiled. If Coffin Queen is untapped when its ability resolves, the creature will not be exiled until the next time Coffin Queen becomes untapped.