UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vALrunKac96WckzQASUWYwxyQZWAUzTeTM8YJrs6iF8='
WHERE
key_id = '425436abcb270d7fcaad65322645731c6a79bb3909ffa771a4cb857a9e31e40f'
AND (
token = 'vALrunKac96WckzQASUWYwxyQZWAUzTeTM8YJrs6iF8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)