UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '71wljS1edBoco1rx1TDn3sjEk+92ICYbTnZ2e9X2mtY='
WHERE
key_id = '7b146313d5b3fb2fc0eca5e86fa56caa70cb232cbd5b10c8eb9c24e01dcc4302'
AND (
token = '71wljS1edBoco1rx1TDn3sjEk+92ICYbTnZ2e9X2mtY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)