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 (
    442, 443, 444, 445, 446, 447, 448, 449, 
    310, 311, 312, 313, 314, 315, 316, 317, 
    318, 319, 320, 321, 322, 323, 324, 325, 
    326, 327, 328, 329, 330, 331
  ) 
  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.00107

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "72.01"
    },
    "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": 30,
        "rows_produced_per_join": 5,
        "filtered": "19.99",
        "index_condition": "(`portal`.`q_product_prices`.`product_id` in (442,443,444,445,446,447,448,449,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331))",
        "cost_info": {
          "read_cost": "70.81",
          "eval_cost": "1.20",
          "prefix_cost": "72.01",
          "data_read_per_join": "143"
        },
        "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
310 115.000000
311 209.000000
312 159.000000
313 159.000000
314 99.000000
315 79.000000
316 79.000000
317 99.000000
318 135.000000
319 69.000000
320 99.000000
321 105.000000
322 85.000000
323 75.000000
324 99.000000
325 64.000000
326 99.000000
327 95.000000
328 119.000000
329 135.000000
330 99.000000
331 99.000000
442 299.000000
443 355.000000
444 335.000000
445 365.000000
446 325.000000
447 220.000000
448 185.000000
449 220.000000