UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Cbzii6efRFGaQsgidRCyhNRK2MeEKjpYZHuZoqXQIIw='
WHERE
key_id = '76912cbba050e3c0acf1b93f1e6739ef6a097abc78e1958fb75fac8b8ae37c9a'
AND (
token = 'Cbzii6efRFGaQsgidRCyhNRK2MeEKjpYZHuZoqXQIIw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)