UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bU6k4OL76AEP3TN7fsMMBA9WRyurr21WbQTH7iWi91Q='
WHERE
key_id = '0c14224e98e08a263907fa78fd4c98204fc4b43bbe5b9bab6ec927b4cca462c2'
AND (
token = 'bU6k4OL76AEP3TN7fsMMBA9WRyurr21WbQTH7iWi91Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)