UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HmYWopwNGsNmAJq2LZX9ChMWCFmghYEQhCavNQOnHF8='
WHERE
key_id = '75033aab8f62d6ed34c40b15cdda2208b35949c1c8fb9728ef82eea4f22d7696'
AND (
token = 'HmYWopwNGsNmAJq2LZX9ChMWCFmghYEQhCavNQOnHF8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)