UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9oTNbZtFgyu8SW4uVQNfVX5eX3XDQInJJxghzRyWiVs='
WHERE
key_id = '32bcc71c93d51ea730ac49c81dcc0c419882332edc846a08fbc78328b008f0aa'
AND (
token = '9oTNbZtFgyu8SW4uVQNfVX5eX3XDQInJJxghzRyWiVs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)