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 (
    30355, 30359, 30387, 30392, 30393, 30399, 
    30401, 30402, 30403, 30406, 30407, 
    30668, 30671, 30672, 30675, 30676, 
    30682, 30686, 30694, 30695, 30699, 
    30701, 30702, 30704, 30705, 30707, 
    30708, 30711, 30712, 30713
  ) 
  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.00091

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "102.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": 52,
        "rows_produced_per_join": 10,
        "filtered": "19.99",
        "index_condition": "(`portal`.`q_product_prices`.`product_id` in (30355,30359,30387,30392,30393,30399,30401,30402,30403,30406,30407,30668,30671,30672,30675,30676,30682,30686,30694,30695,30699,30701,30702,30704,30705,30707,30708,30711,30712,30713))",
        "cost_info": {
          "read_cost": "100.73",
          "eval_cost": "2.08",
          "prefix_cost": "102.81",
          "data_read_per_join": "249"
        },
        "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
30355 60.000000
30359 40.000000
30387 67.000000
30392 74.000000
30393 44.000000
30399 144.000000
30401 38.000000
30402 49.000000
30403 46.000000
30406 58.000000
30407 39.000000
30668 53.000000
30671 107.000000
30672 26.000000
30675 32.000000
30676 32.000000
30682 27.000000
30686 29.000000
30694 35.000000
30695 46.000000
30699 45.000000
30701 40.000000
30702 104.000000
30704 43.000000
30705 206.000000
30707 43.000000
30708 27.000000
30711 61.000000
30712 31.000000
30713 38.000000