UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F7Eu7kBMWOcmqHmwK8DmR6CbUsKHvSZPmDdouTn+/zk='
WHERE
key_id = '69e82addf0229f94c81958584cc4e1e23dfb06fb369dc91f30dd9a4bfc4a9d92'
AND (
token = 'F7Eu7kBMWOcmqHmwK8DmR6CbUsKHvSZPmDdouTn+/zk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)