UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ilCkTA3M/QcEU7wTF5Q6+wFmIXnHK5CGa0IFUYmN3FY='
WHERE
key_id = '75d6dd7f5e60eb9f9e554116dafe501983d0b3694e909485ea47b5a4e2ed5917'
AND (
token = 'ilCkTA3M/QcEU7wTF5Q6+wFmIXnHK5CGa0IFUYmN3FY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)