UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'izwbdTGwYEKQNpvl29iCcobOH8cQYWxBESZV7z6i+KM='
WHERE
key_id = 'bcf36bd5b9bbad123ca0a00a8dbc8fde58d1c40297cd865bbd2fd15cebfb379c'
AND (
token = 'izwbdTGwYEKQNpvl29iCcobOH8cQYWxBESZV7z6i+KM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)