SELECT 
  cscart_product_prices.product_id, 
  MIN(
    IF(
      cscart_product_prices.percentage_discount = 0, 
      cscart_product_prices.price, 
      cscart_product_prices.price - (
        cscart_product_prices.price * cscart_product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  cscart_product_prices 
WHERE 
  cscart_product_prices.product_id IN (
    15147, 15477, 2640, 12975, 11118, 12685, 
    2566, 3215, 3214, 15154, 13222, 14298, 
    13223, 16052, 2733, 2736, 2734, 2735, 
    15140, 2829, 2659, 14661, 15424, 2681, 
    2770, 2771, 2731, 15130, 17301, 15153
  ) 
  AND cscart_product_prices.lower_limit = 1 
  AND cscart_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  cscart_product_prices.product_id

Query time 0.00147

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "24.16"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_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": 37,
        "rows_produced_per_join": 5,
        "filtered": "14.40",
        "index_condition": "(`dev_yourmart_co_bw`.`cscart_product_prices`.`product_id` in (15147,15477,2640,12975,11118,12685,2566,3215,3214,15154,13222,14298,13223,16052,2733,2736,2734,2735,15140,2829,2659,14661,15424,2681,2770,2771,2731,15130,17301,15153))",
        "cost_info": {
          "read_cost": "23.63",
          "eval_cost": "0.53",
          "prefix_cost": "24.16",
          "data_read_per_join": "127"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`dev_yourmart_co_bw`.`cscart_product_prices`.`lower_limit` = 1) and (`dev_yourmart_co_bw`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
2566 79.20000000
2640 162.53000000
2659 743.50000000
2681 200.00000000
2731 87.50000000
2733 158.85000000
2734 86.54000000
2735 104.10000000
2736 104.10000000
2770 200.00000000
2771 200.00000000
2829 204.05000000
3214 110.75000000
3215 110.75000000
11118 118.55000000
12685 118.55000000
12975 75.55000000
13222 92.65000000
13223 88.95000000
14298 88.95000000
14661 169.63000000
15130 87.50000000
15140 148.55000000
15147 120.05000000
15153 180.05000000
15154 247.15000000
15424 136.80000000
15477 144.95000000
16052 253.45000000
17301 80.20000000