If transaction has impossible locking script, are coins lost?
If it made it into the blockchain, meaning 1 confirmation or more, it practically can't be invalidated. The same feature prevents people from reversing payments.

If it's provably unsolvable, then there's no way to spend the coins, and they're practically destroyed.