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 (
    1662418, 1659922, 1661347, 1657700, 
    1658556, 1659797, 1659562, 1657765, 
    1657745, 1661374, 1915737, 1659943, 
    1661339, 1659257, 1660558, 1659816, 
    2591113, 1658321, 1662787, 1664138, 
    1660123, 1664236, 1661363, 1916044, 
    1660260, 1657702, 1660929, 1663152, 
    2596602, 2099753, 1658439, 1663290, 
    1661128, 1658521, 1658562, 2068216
  ) 
  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.00253

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "81.40"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "usergroup",
        "used_key_parts": [
          "product_id",
          "usergroup_id",
          "lower_limit"
        ],
        "key_length": "9",
        "rows_examined_per_scan": 72,
        "rows_produced_per_join": 72,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "74.20",
          "eval_cost": "7.20",
          "prefix_cost": "81.40",
          "data_read_per_join": "1K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`maniamall_cscart`.`cscart_product_prices`.`lower_limit` = 1) and (`maniamall_cscart`.`cscart_product_prices`.`product_id` in (1662418,1659922,1661347,1657700,1658556,1659797,1659562,1657765,1657745,1661374,1915737,1659943,1661339,1659257,1660558,1659816,2591113,1658321,1662787,1664138,1660123,1664236,1661363,1916044,1660260,1657702,1660929,1663152,2596602,2099753,1658439,1663290,1661128,1658521,1658562,2068216)) and (`maniamall_cscart`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
1657700 103.510000
1657702 102.630000
1657745 211.690000
1657765 181.760000
1658321 382.750000
1658439 39.560000
1658521 79.060000
1658556 173.200000
1658562 833.940000
1659257 2.360000
1659562 119.730000
1659797 11.540000
1659816 58.090000
1659922 5.350000
1659943 384.880000
1660123 77.630000
1660260 29.230000
1660558 70.060000
1660929 421.250000
1661128 703.500000
1661339 134.700000
1661347 224.310000
1661363 162.500000
1661374 158.660000
1662418 37.490000
1662787 17.490000
1663152 325.030000
1663290 135.140000
1664138 55.600000
1664236 28.910000
1915737 20.510000
1916044 40.210000
2068216 212.490000
2099753 38.460000
2591113 49.990000
2596602 49.990000