SELECT 
  q_product_prices.product_id, 
  MIN(
    IF(
      q_product_prices.percentage_discount = 0, 
      q_product_prices.price, 
      q_product_prices.price - (
        q_product_prices.price * q_product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  q_product_prices 
WHERE 
  q_product_prices.product_id IN (
    35664, 35665, 35666, 35667, 35668, 35669, 
    35670, 35671, 35672, 35673, 35674, 
    35675, 35676, 35677, 35678, 35679, 
    35680, 35681, 35682, 35683, 35684, 
    35685, 35686, 35687, 35688, 35689, 
    35690, 35691, 35692, 35693, 35694, 
    35695
  ) 
  AND q_product_prices.lower_limit = 1 
  AND q_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  q_product_prices.product_id

Query time 0.00090

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "76.81"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "q_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "product_id",
        "used_key_parts": [
          "product_id"
        ],
        "key_length": "3",
        "rows_examined_per_scan": 32,
        "rows_produced_per_join": 6,
        "filtered": "19.99",
        "index_condition": "(`portal`.`q_product_prices`.`product_id` in (35664,35665,35666,35667,35668,35669,35670,35671,35672,35673,35674,35675,35676,35677,35678,35679,35680,35681,35682,35683,35684,35685,35686,35687,35688,35689,35690,35691,35692,35693,35694,35695))",
        "cost_info": {
          "read_cost": "75.53",
          "eval_cost": "1.28",
          "prefix_cost": "76.81",
          "data_read_per_join": "153"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`portal`.`q_product_prices`.`lower_limit` = 1) and (`portal`.`q_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
35664 366.000000
35665 386.000000
35666 366.000000
35667 346.000000
35668 406.000000
35669 366.000000
35670 426.000000
35671 366.000000
35672 496.000000
35673 496.000000
35674 366.000000
35675 496.000000
35676 466.000000
35677 506.000000
35678 956.000000
35679 1046.000000
35680 366.000000
35681 366.000000
35682 326.000000
35683 316.000000
35684 446.000000
35685 316.000000
35686 416.000000
35687 316.000000
35688 326.000000
35689 406.000000
35690 316.000000
35691 326.000000
35692 296.000000
35693 376.000000
35694 296.000000
35695 296.000000