UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6sTbKzHg5jCqQ0TLmEtSw/HRYNtYNLGO6VLb6H6gEpo='
WHERE
key_id = 'dbe1ef26b527535eb9a19ca22594c6f1a873dcebb329c36e9d74654d98bfa666'
AND (
token = '6sTbKzHg5jCqQ0TLmEtSw/HRYNtYNLGO6VLb6H6gEpo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)