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 (
    2423, 2424, 1257, 1258, 1259, 1260, 1261, 
    1262, 1263, 1264, 1228, 1236, 1252, 
    1253, 1254, 1209, 1169, 1170, 1171, 
    1172, 1173, 1174, 1175, 1176, 1177, 
    1178, 1179, 1180, 1181, 1182
  ) 
  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.00102

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 (2423,2424,1257,1258,1259,1260,1261,1262,1263,1264,1228,1236,1252,1253,1254,1209,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182))",
        "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
1169 65.000000
1170 65.000000
1171 69.000000
1172 59.000000
1173 65.000000
1174 59.000000
1175 59.000000
1176 39.000000
1177 41.000000
1178 59.000000
1179 55.000000
1180 52.000000
1181 52.000000
1182 55.000000
1209 119.000000
1228 47.000000
1236 185.000000
1252 73.000000
1253 135.000000
1254 209.000000
1257 75.000000
1258 139.000000
1259 129.000000
1260 199.000000
1261 189.000000
1262 109.000000
1263 109.000000
1264 75.000000
2423 45.000000
2424 17.000000