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 (
    352386, 358695, 351371, 354344, 355656, 
    355717, 355719, 357488, 352231, 354808, 
    356679, 357144, 357567, 358789, 351261, 
    355919, 357569, 359418, 352382, 351602, 
    355645, 355142, 358320, 351445, 354347, 
    355723, 357136, 351377, 355661, 357611, 
    358359, 358477, 358540, 358877, 352477, 
    354416, 356003, 356241, 356526, 358730, 
    352616, 352754, 356383, 356426, 355938, 
    357139, 358395, 358769, 349759, 351301, 
    351349, 351818, 352701, 358389, 358438, 
    358544, 356680, 357524, 349747, 352680, 
    352327, 355856, 356432, 357525, 358384, 
    351405, 351413, 351546, 352588, 354456, 
    354837, 355026, 355918, 356619, 350179, 
    352359, 355669, 352325, 356387, 358644, 
    354369, 354423, 355726, 356210, 356291, 
    356651, 352567, 354491, 354747, 354815, 
    355792, 356220, 352322, 354453, 354878, 
    356601, 356691, 358593, 351406, 352458
  ) 
  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.00165

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 (352386,358695,351371,354344,355656,355717,355719,357488,352231,354808,356679,357144,357567,358789,351261,355919,357569,359418,352382,351602,355645,355142,358320,351445,354347,355723,357136,351377,355661,357611,358359,358477,358540,358877,352477,354416,356003,356241,356526,358730,352616,352754,356383,356426,355938,357139,358395,358769,349759,351301,351349,351818,352701,358389,358438,358544,356680,357524,349747,352680,352327,355856,356432,357525,358384,351405,351413,351546,352588,354456,354837,355026,355918,356619,350179,352359,355669,352325,356387,358644,354369,354423,355726,356210,356291,356651,352567,354491,354747,354815,355792,356220,352322,354453,354878,356601,356691,358593,351406,352458)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
349747 2.35000000
349759 2.35000000
350179 8.30000000
351261 88.15000000
351301 33.75000000
351349 7.96000000
351371 13.06000000
351377 30.23000000
351405 3.88000000
351406 4.73000000
351413 27.85000000
351445 2.45000000
351546 9.32000000
351602 0.82000000
351818 134.05000000
352231 5.75000000
352322 17.65000000
352325 32.95000000
352327 14.08000000
352359 83.05000000
352382 18.45000000
352386 186.75000000
352458 42.25000000
352477 43.95000000
352567 66.05000000
352588 13.06000000
352616 28.65000000
352680 15.05000000
352701 23.55000000
352754 22.02000000
354344 37.15000000
354347 42.25000000
354369 16.75000000
354416 12.55000000
354423 7.62000000
354453 5.07000000
354456 14.08000000
354491 11.87000000
354747 1.22000000
354808 1.22000000
354815 18.45000000
354837 10.00000000
354878 35.45000000
355026 8.47000000
355142 11.36000000
355645 2.45000000
355656 8.30000000
355661 3.71000000
355669 12.38000000
355717 11.87000000
355719 6.60000000
355723 9.95000000
355726 5.07000000
355792 3.37000000
355856 4.22000000
355918 5.58000000
355919 5.92000000
355938 6.26000000
356003 13.06000000
356210 147.65000000
356220 169.75000000
356241 26.15000000
356291 15.10000000
356383 1.22000000
356387 12.55000000
356426 1.22000000
356432 8.47000000
356526 8.47000000
356601 16.29000000
356619 33.75000000
356651 5.58000000
356679 3.88000000
356680 3.88000000
356691 5.58000000
357136 18.67000000
357139 7.28000000
357144 9.95000000
357488 5.07000000
357524 1.33000000
357525 3.71000000
357567 6.26000000
357569 6.26000000
357611 11.54000000
358320 28.65000000
358359 49.05000000
358384 8.98000000
358389 11.87000000
358395 6.26000000
358438 28.65000000
358477 4.56000000
358540 45.65000000
358544 45.65000000
358593 50.75000000
358644 8.47000000
358695 6.77000000
358730 11.87000000
358769 10.68000000
358789 14.42000000
358877 20.15000000
359418 7.62000000