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 (
    1660621, 1663150, 1664049, 1658333, 
    1658334, 1664157, 1658506, 1657840, 
    1657777, 1658557, 1661197, 1662527, 
    1658427, 1658811, 1658265, 1663182, 
    1658593, 1660401, 1658270, 1663613, 
    1659564, 1658864, 1657833, 1662451, 
    1661407, 1659246, 1663612, 2099795, 
    1660547, 1660154, 1659920, 1659832, 
    1658398, 1658504, 1661697, 1661022
  ) 
  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.02905

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "81.10"
    },
    "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": "73.90",
          "eval_cost": "7.20",
          "prefix_cost": "81.10",
          "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 (1660621,1663150,1664049,1658333,1658334,1664157,1658506,1657840,1657777,1658557,1661197,1662527,1658427,1658811,1658265,1663182,1658593,1660401,1658270,1663613,1659564,1658864,1657833,1662451,1661407,1659246,1663612,2099795,1660547,1660154,1659920,1659832,1658398,1658504,1661697,1661022)) and (`maniamall_cscart`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
1657777 64.130000
1657833 38.500000
1657840 13.900000
1658265 37.110000
1658270 47.480000
1658333 16.940000
1658334 16.900000
1658398 40.630000
1658427 57.710000
1658504 173.200000
1658506 156.100000
1658557 168.930000
1658593 156.090000
1658811 192.430000
1658864 85.330000
1659246 1.700000
1659564 48.110000
1659832 100.730000
1659920 5.350000
1660154 42.750000
1660401 147.360000
1660547 273.130000
1660621 120.390000
1661022 37.560000
1661197 363.700000
1661407 230.930000
1661697 45.340000
1662451 112.900000
1662527 6.840000
1663150 271.140000
1663182 26.530000
1663612 58.160000
1663613 58.160000
1664049 170.860000
1664157 382.750000
2099795 49.660000