UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gVABiH/q69zD2SbGAYT3rbd4ZvlzzB2jiWkrV19NZuY='
WHERE
key_id = '630cfbc7b05dd338462078e42e4d6e1fd6f1eecaa0d5a38ae8901e64cf33e708'
AND (
token = 'gVABiH/q69zD2SbGAYT3rbd4ZvlzzB2jiWkrV19NZuY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)