UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VbMZqXOUh5zU1hgrL9tB/Kkd+7Vf7ikWRW7xN4XXRpA='
WHERE
key_id = '625709374b421bc460bba490b52cfa86cadd0d161911f7ca0fb9eff17bd93e12'
AND (
token = 'VbMZqXOUh5zU1hgrL9tB/Kkd+7Vf7ikWRW7xN4XXRpA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)