UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fqUi3IldSN/5cR9CXGA0BshRvCmVYRWAAER9WQx059M='
WHERE
key_id = '19eda8d62c4c2c9be0935950628bc836b90f8e6819fbdc67c9568aa43dacbddf'
AND (
token = 'fqUi3IldSN/5cR9CXGA0BshRvCmVYRWAAER9WQx059M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)