UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OuG+jPN4ylSWCjNqlygR3h3oLQ6Y5Uuh5hF/ZKePRSk=' 
WHERE 
  key_id = '5e3a5803ef507f85af4ad9c92a4f30822823f477b613e4c0bb74bdc99972f2a8' 
  AND (
    token = 'OuG+jPN4ylSWCjNqlygR3h3oLQ6Y5Uuh5hF/ZKePRSk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045