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 (
    32554, 32555, 32556, 32557, 32558, 32559, 
    32560, 32562, 32563, 32564, 32565, 
    32566, 32567, 32568, 32569, 32570, 
    32571, 32573, 32574, 32575, 32576, 
    32577, 32579, 32580, 32581, 32582, 
    32583, 32584, 32585, 32586, 32588, 
    32589
  ) 
  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.00081

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 (32554,32555,32556,32557,32558,32559,32560,32562,32563,32564,32565,32566,32567,32568,32569,32570,32571,32573,32574,32575,32576,32577,32579,32580,32581,32582,32583,32584,32585,32586,32588,32589))",
        "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
32554 285.000000
32555 414.000000
32556 414.000000
32557 414.000000
32558 414.000000
32559 414.000000
32560 414.000000
32562 414.000000
32563 414.000000
32564 414.000000
32565 414.000000
32566 414.000000
32567 414.000000
32568 414.000000
32569 414.000000
32570 414.000000
32571 414.000000
32573 414.000000
32574 414.000000
32575 414.000000
32576 414.000000
32577 414.000000
32579 414.000000
32580 414.000000
32581 414.000000
32582 414.000000
32583 259.000000
32584 259.000000
32585 259.000000
32586 259.000000
32588 242.000000
32589 242.000000