UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '15deBkFoF82pvtrjHeBx5AqwoOK+61vv53E1Yg9Iw+M='
WHERE
key_id = '9494fcfacc99c305de2296f75adf9cf963c0a64fd92fb63bc31b99139bbe272d'
AND (
token = '15deBkFoF82pvtrjHeBx5AqwoOK+61vv53E1Yg9Iw+M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)