UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rJxSQPhEgaJecbnGPuUKeSGZV6eBuZmA0TME8HNnfVA='
WHERE
key_id = '719c0b5835d061c4f531d8af4103e0cc86847ffcba8b6b8c58d11237ad6f98cc'
AND (
token = 'rJxSQPhEgaJecbnGPuUKeSGZV6eBuZmA0TME8HNnfVA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)