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 (
    358341, 358580, 349830, 351247, 352470, 
    352592, 354508, 355725, 355735, 358488, 
    358587, 349696, 349745, 349793, 351351, 
    351461, 355932, 356531, 358738, 352521, 
    357444, 358729, 358885, 358938, 351397, 
    351399, 351531, 352355, 354978, 356486, 
    358942, 358993, 349953, 351340, 352731, 
    356310, 356671, 358386, 358895, 354431, 
    354616, 354875, 355018, 355681, 356569, 
    356699, 351392, 352707, 356390, 356404, 
    357799, 358782, 351438, 351530, 352761, 
    356212, 356593, 358543, 351407, 351805, 
    352232, 354507, 355974, 359019, 352306, 
    354395, 354795, 355655, 356243, 349754, 
    351457, 354388, 354497, 354865, 356242, 
    358460, 351318, 351334, 351398, 351424, 
    351447, 354405, 354838, 356661, 354415, 
    355850, 357493, 351576, 352583, 359028, 
    351286, 352445, 352554, 356046, 356363, 
    359046, 352393, 357522, 354767, 358637
  ) 
  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.00179

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "280.31"
    },
    "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": 200,
        "rows_produced_per_join": 200,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "240.31",
          "eval_cost": "40.00",
          "prefix_cost": "280.31",
          "data_read_per_join": "12K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`webmarco`.`cscart_product_prices`.`lower_limit` = 1) and (`webmarco`.`cscart_product_prices`.`product_id` in (358341,358580,349830,351247,352470,352592,354508,355725,355735,358488,358587,349696,349745,349793,351351,351461,355932,356531,358738,352521,357444,358729,358885,358938,351397,351399,351531,352355,354978,356486,358942,358993,349953,351340,352731,356310,356671,358386,358895,354431,354616,354875,355018,355681,356569,356699,351392,352707,356390,356404,357799,358782,351438,351530,352761,356212,356593,358543,351407,351805,352232,354507,355974,359019,352306,354395,354795,355655,356243,349754,351457,354388,354497,354865,356242,358460,351318,351334,351398,351424,351447,354405,354838,356661,354415,355850,357493,351576,352583,359028,351286,352445,352554,356046,356363,359046,352393,357522,354767,358637)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
349696 6.60000000
349745 2.35000000
349754 1.33000000
349793 12.89000000
349830 1.50000000
349953 3.54000000
351247 181.65000000
351286 13.57000000
351318 35.45000000
351334 84.75000000
351340 52.45000000
351351 27.17000000
351392 10.51000000
351397 7.79000000
351398 10.00000000
351399 3.88000000
351407 5.24000000
351424 13.35000000
351438 5.58000000
351447 1.84000000
351457 7.11000000
351461 3.88000000
351530 5.75000000
351531 5.75000000
351576 1.22000000
351805 207.15000000
352232 10.34000000
352306 26.95000000
352355 11.87000000
352393 77.95000000
352445 28.65000000
352470 76.25000000
352521 26.27000000
352554 18.67000000
352583 13.06000000
352592 13.06000000
352707 62.65000000
352731 12.38000000
352761 11.36000000
354388 12.89000000
354395 45.65000000
354405 26.95000000
354415 10.68000000
354431 3.37000000
354497 15.05000000
354507 3.71000000
354508 12.55000000
354616 1.16000000
354767 15.22000000
354795 5.07000000
354838 10.00000000
354865 5.92000000
354875 26.95000000
354978 49.05000000
355018 38.85000000
355655 7.11000000
355681 13.35000000
355725 6.26000000
355735 6.43000000
355850 9.15000000
355932 12.55000000
355974 13.06000000
356046 4.90000000
356212 161.25000000
356242 19.01000000
356243 37.15000000
356310 16.29000000
356363 8.47000000
356390 12.72000000
356404 42.25000000
356486 6.26000000
356531 16.29000000
356569 6.26000000
356593 32.05000000
356661 16.75000000
356671 1.67000000
356699 3.71000000
357444 12.38000000
357493 1.33000000
357522 3.03000000
357799 7.28000000
358341 1.22000000
358386 40.55000000
358460 24.57000000
358488 1.67000000
358543 50.75000000
358580 45.65000000
358587 45.65000000
358637 3.20000000
358729 9.32000000
358738 4.90000000
358782 17.31000000
358885 10.85000000
358895 15.10000000
358938 11.70000000
358942 5.92000000
358993 20.26000000
359019 5.05000000
359028 6.07000000
359046 6.09000000