UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vlo0TGKTEtg7MvExABnmd5KoA2OjVMbZqhzKrXx6RRQ='
WHERE
key_id = '754cc220711abb5cc5b13d10295bf89756227151f32c6d9b51443fe48cab5c9a'
AND (
token = 'Vlo0TGKTEtg7MvExABnmd5KoA2OjVMbZqhzKrXx6RRQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)