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 (
    32447, 32448, 32450, 32451, 32452, 32453, 
    32454, 32455, 32456, 32457, 32458, 
    32460, 32461, 32462, 32463, 32465, 
    32466, 32467, 32468, 32469, 32471, 
    32472, 32473, 32474, 32475, 32476, 
    32478, 32479, 32480, 32481, 32482, 
    32483
  ) 
  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.00077

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "85.21"
    },
    "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": 38,
        "rows_produced_per_join": 7,
        "filtered": "19.99",
        "index_condition": "(`portal`.`q_product_prices`.`product_id` in (32447,32448,32450,32451,32452,32453,32454,32455,32456,32457,32458,32460,32461,32462,32463,32465,32466,32467,32468,32469,32471,32472,32473,32474,32475,32476,32478,32479,32480,32481,32482,32483))",
        "cost_info": {
          "read_cost": "83.69",
          "eval_cost": "1.52",
          "prefix_cost": "85.21",
          "data_read_per_join": "182"
        },
        "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
32447 293.000000
32448 293.000000
32450 155.000000
32451 155.000000
32452 155.000000
32453 155.000000
32454 155.000000
32455 155.000000
32456 207.000000
32457 207.000000
32458 207.000000
32460 207.000000
32461 207.000000
32462 207.000000
32463 207.000000
32465 276.000000
32466 276.000000
32467 380.000000
32468 380.000000
32469 380.000000
32471 380.000000
32472 276.000000
32473 276.000000
32474 276.000000
32475 276.000000
32476 276.000000
32478 276.000000
32479 276.000000
32480 276.000000
32481 276.000000
32482 276.000000
32483 276.000000