UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sFr/R9fQUX4pcZLMIsDJ6Dke8lGjtMXRUEmeYtO4b9E='
WHERE
key_id = '4199d7d95aea54efb46ddac635ddb1a4aa4836fe1bed7a242a84ee3fc0a48004'
AND (
token = 'sFr/R9fQUX4pcZLMIsDJ6Dke8lGjtMXRUEmeYtO4b9E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)