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 (
    13489, 13494, 13495, 13500, 13501, 13502, 
    13504, 13506, 14432, 14448, 14459, 
    14460, 14461, 14462, 14464, 14465, 
    14466, 14467, 14468, 14469, 14470, 
    14471, 14474, 14498, 14512, 14513, 
    14514, 14518, 14519, 14520
  ) 
  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.00096

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 (13489,13494,13495,13500,13501,13502,13504,13506,14432,14448,14459,14460,14461,14462,14464,14465,14466,14467,14468,14469,14470,14471,14474,14498,14512,14513,14514,14518,14519,14520))",
        "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
13489 99.000000
13494 126.000000
13495 52.000000
13500 66.000000
13501 276.000000
13502 241.000000
13504 54.000000
13506 109.000000
14432 156.000000
14448 344.000000
14459 41.000000
14460 42.000000
14461 61.000000
14462 301.000000
14464 56.000000
14465 39.000000
14466 46.000000
14467 99.000000
14468 276.000000
14469 121.000000
14470 164.000000
14471 246.000000
14474 389.000000
14498 42.000000
14512 81.000000
14513 86.000000
14514 106.000000
14518 49.000000
14519 149.000000
14520 99.000000