UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4js3FmvjNZU/6XAX6sIXe9iT8ceBzjltBUoQA8hNIao='
WHERE
key_id = '66a1cc405dd9b56c3a2dea478681da048be1217ac9c55a3ac8707d77b6c68236'
AND (
token = '4js3FmvjNZU/6XAX6sIXe9iT8ceBzjltBUoQA8hNIao='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)