UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zxfv+iti67qLF+W1D2HAUcO6NwNI2X6Wcs7Mc8kNXGE='
WHERE
key_id = 'a84b3fb7cbd08a3daefad1a79400e905cc27f304012a2edc041412ba0b7fa21e'
AND (
token = 'Zxfv+iti67qLF+W1D2HAUcO6NwNI2X6Wcs7Mc8kNXGE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)