UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6017bo5zN4ODZoo+S0oEtfbsASZP4QNkQwwDzRbUcC4='
WHERE
key_id = '00fd8385425fb7c43af883bb0d3cc9c352f1e6eaf132a6e514dc56f1e32cb20e'
AND (
token = '6017bo5zN4ODZoo+S0oEtfbsASZP4QNkQwwDzRbUcC4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)