UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'V42pGnPM3nx49GY3uosBuP/iPWcDhxp9w1Ki/KooHvs=' 
WHERE 
  key_id = 'e886a36c362bfa3be38799cb6f00aaffd1b7e1b30c4da7b60c433851fd556a8f' 
  AND (
    token = 'V42pGnPM3nx49GY3uosBuP/iPWcDhxp9w1Ki/KooHvs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017