UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JFscukOzkgX0TKmKSmWNWnVSWIdFNmqOhe1OzQpbLGY='
WHERE
key_id = '38d0b0c526331d18946350efac8d6f06b9b6abba5e22b26fbe5180f86ef70621'
AND (
token = 'JFscukOzkgX0TKmKSmWNWnVSWIdFNmqOhe1OzQpbLGY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)