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 (
    9741, 9742, 9743, 9744, 9745, 9746, 9747, 
    9748, 9749, 9750, 9751, 9752, 9753, 
    9754, 9755, 9756, 9757, 9758, 9759, 
    9760, 9761, 9762, 9763, 9764, 9765, 
    9766, 9767, 9768, 9769, 9770, 9771, 
    9772
  ) 
  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.00094

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 (9741,9742,9743,9744,9745,9746,9747,9748,9749,9750,9751,9752,9753,9754,9755,9756,9757,9758,9759,9760,9761,9762,9763,9764,9765,9766,9767,9768,9769,9770,9771,9772))",
        "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
9741 199.000000
9742 229.000000
9743 429.000000
9744 75.000000
9745 85.000000
9746 105.000000
9747 139.000000
9748 85.000000
9749 115.000000
9750 115.000000
9751 159.000000
9752 85.000000
9753 85.000000
9754 105.000000
9755 105.000000
9756 149.000000
9757 95.000000
9758 49.000000
9759 169.000000
9760 249.000000
9761 75.000000
9762 95.000000
9763 285.000000
9764 849.000000
9765 199.000000
9766 149.000000
9767 149.000000
9768 269.000000
9769 849.000000
9770 899.000000
9771 1399.000000
9772 229.000000