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 (
    4651, 5190, 1580, 3324, 3495, 5253, 5387, 
    3321, 3327, 1667, 3932, 2090, 2277, 
    5843, 2278, 5969, 3338, 2400, 5814, 
    5251, 5831, 4239, 5751, 5740, 4191, 
    5839, 2179, 5813, 1629, 5205, 5266, 
    1666, 5024, 5262, 5282, 5565, 3332, 
    5275, 5264, 5825, 5924, 5283, 5838, 
    5268, 5738, 1630, 3494, 5274, 2183, 
    2237, 5273, 5291, 2087, 3491, 3930, 
    4233, 5927, 2239, 8813, 1843, 5182, 
    2092, 5267, 5279, 2176, 2238, 5269, 
    5280, 5017, 1671, 3801, 2091, 1845, 
    2089, 3498, 5286, 2276, 4475, 3506, 
    5211
  ) 
  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.00202

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "56.01"
    },
    "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": 80,
        "rows_produced_per_join": 15,
        "filtered": "19.99",
        "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`product_id` in (4651,5190,1580,3324,3495,5253,5387,3321,3327,1667,3932,2090,2277,5843,2278,5969,3338,2400,5814,5251,5831,4239,5751,5740,4191,5839,2179,5813,1629,5205,5266,1666,5024,5262,5282,5565,3332,5275,5264,5825,5924,5283,5838,5268,5738,1630,3494,5274,2183,2237,5273,5291,2087,3491,3930,4233,5927,2239,8813,1843,5182,2092,5267,5279,2176,2238,5269,5280,5017,1671,3801,2091,1845,2089,3498,5286,2276,4475,3506,5211))",
        "cost_info": {
          "read_cost": "54.41",
          "eval_cost": "1.60",
          "prefix_cost": "56.01",
          "data_read_per_join": "383"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`lower_limit` = 1) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
1580 320000.00000000
1629 3900000.00000000
1630 825000.00000000
1666 45000.00000000
1667 44000.00000000
1671 45000.00000000
1843 175000.00000000
1845 215000.00000000
2087 850000.00000000
2089 450000.00000000
2090 105000.00000000
2091 247500.00000000
2092 375000.00000000
2176 21000.00000000
2179 29000.00000000
2183 34000.00000000
2237 620000.00000000
2238 135000.00000000
2239 700000.00000000
2276 145000.00000000
2277 60000.00000000
2278 225000.00000000
2400 18000.00000000
3321 152000.00000000
3324 30000.00000000
3327 185000.00000000
3332 250000.00000000
3338 205000.00000000
3491 745000.00000000
3494 275000.00000000
3495 1745000.00000000
3498 31000.00000000
3506 781000.00000000
3801 720000.00000000
3930 42000.00000000
3932 21000.00000000
4191 36000.00000000
4233 60000.00000000
4239 72000.00000000
4475 341000.00000000
4651 204000.00000000
5017 13950.00000000
5024 13950.00000000
5182 25000.00000000
5190 202000.00000000
5205 8250.00000000
5211 306000.00000000
5251 1890000.00000000
5253 352000.00000000
5262 8000.00000000
5264 8000.00000000
5266 8000.00000000
5267 8000.00000000
5268 8000.00000000
5269 8000.00000000
5273 8000.00000000
5274 8000.00000000
5275 8000.00000000
5279 8000.00000000
5280 8000.00000000
5282 8000.00000000
5283 8000.00000000
5286 8000.00000000
5291 8000.00000000
5387 90000.00000000
5565 3195000.00000000
5738 720000.00000000
5740 792000.00000000
5751 685000.00000000
5813 306000.00000000
5814 694000.00000000
5825 226000.00000000
5831 306000.00000000
5838 406000.00000000
5839 1404000.00000000
5843 136000.00000000
5924 69000.00000000
5927 229000.00000000
5969 13950.00000000
8813 27000.00000000