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 (
    9170, 9171, 9172, 9173, 9174, 9175, 9176, 
    9177, 9178, 9179, 9180, 9181, 9182, 
    9183, 9185, 9186, 9187, 9188, 9189, 
    9190, 9191, 9192, 9193, 9194, 9195, 
    9196, 9197, 9198, 9199, 9200, 9201, 
    9202
  ) 
  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.00099

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "96.41"
    },
    "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": 46,
        "rows_produced_per_join": 9,
        "filtered": "19.99",
        "index_condition": "(`portal`.`q_product_prices`.`product_id` in (9170,9171,9172,9173,9174,9175,9176,9177,9178,9179,9180,9181,9182,9183,9185,9186,9187,9188,9189,9190,9191,9192,9193,9194,9195,9196,9197,9198,9199,9200,9201,9202))",
        "cost_info": {
          "read_cost": "94.57",
          "eval_cost": "1.84",
          "prefix_cost": "96.41",
          "data_read_per_join": "220"
        },
        "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
9170 139.000000
9171 95.000000
9172 95.000000
9173 119.000000
9174 169.000000
9175 169.000000
9176 219.000000
9177 219.000000
9178 319.000000
9179 319.000000
9180 129.000000
9181 123.000000
9182 105.000000
9183 88.990000
9185 89.000000
9186 105.000000
9187 229.000000
9188 159.000000
9189 189.000000
9190 159.000000
9191 149.000000
9192 159.000000
9193 149.000000
9194 109.000000
9195 149.000000
9196 85.000000
9197 85.000000
9198 85.000000
9199 85.000000
9200 65.000000
9201 65.000000
9202 66.000000