UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1TCNR6ilbN2vRP2PusGf6pqw3rxcCM8RSM+88C8Reak='
WHERE
key_id = '443ea65b0138364e49a85a519fd4348289f6917cb4bb7abba20f420d433ef74d'
AND (
token = '1TCNR6ilbN2vRP2PusGf6pqw3rxcCM8RSM+88C8Reak='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)