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 (
    32484, 32485, 32486, 32487, 32488, 32489, 
    32490, 32491, 32492, 32493, 32494, 
    32495, 32496, 32497, 32499, 32500, 
    32501, 32502, 32503, 32504, 32505, 
    32506, 32507, 32508, 32509, 32510, 
    32511, 32512, 32513, 32514, 32515, 
    32516
  ) 
  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": "86.61"
    },
    "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": 39,
        "rows_produced_per_join": 7,
        "filtered": "19.99",
        "index_condition": "(`portal`.`q_product_prices`.`product_id` in (32484,32485,32486,32487,32488,32489,32490,32491,32492,32493,32494,32495,32496,32497,32499,32500,32501,32502,32503,32504,32505,32506,32507,32508,32509,32510,32511,32512,32513,32514,32515,32516))",
        "cost_info": {
          "read_cost": "85.05",
          "eval_cost": "1.56",
          "prefix_cost": "86.61",
          "data_read_per_join": "187"
        },
        "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
32484 276.000000
32485 276.000000
32486 276.000000
32487 276.000000
32488 276.000000
32489 276.000000
32490 380.000000
32491 380.000000
32492 380.000000
32493 380.000000
32494 380.000000
32495 328.000000
32496 328.000000
32497 328.000000
32499 328.000000
32500 328.000000
32501 328.000000
32502 328.000000
32503 328.000000
32504 328.000000
32505 328.000000
32506 328.000000
32507 328.000000
32508 328.000000
32509 328.000000
32510 328.000000
32511 328.000000
32512 328.000000
32513 328.000000
32514 328.000000
32515 328.000000
32516 328.000000