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 (
    351129, 355878, 357053, 358162, 358206, 
    350435, 350635, 351079, 353921, 353943, 
    354921, 357257, 358677, 349908, 349924, 
    351514, 351548, 352292, 352334, 352983, 
    353212, 354550, 354562, 355648, 356623, 
    357450, 352115, 354086, 354909, 355214, 
    355331, 356759, 357099, 357149, 351171, 
    351655, 352957, 353084, 353716, 354016, 
    354670, 358291, 351056, 351219, 352947, 
    353838, 355070, 356141, 356169, 357847, 
    350313, 350442, 350900, 351041, 352184, 
    354737, 355817, 356099, 356934, 357299, 
    357933, 359097, 349751, 351006, 351330, 
    351616, 351669, 351702, 352389, 354654, 
    354910, 355213, 356047, 356259, 356447, 
    357041, 358900, 359413, 350381, 350809, 
    350823, 350887, 352113, 353083, 353155, 
    353981, 354768, 354825, 356351, 356587, 
    357594, 357614, 357717, 357750, 351712, 
    354183, 357596, 350755, 351167, 351482
  ) 
  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.00125

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 (351129,355878,357053,358162,358206,350435,350635,351079,353921,353943,354921,357257,358677,349908,349924,351514,351548,352292,352334,352983,353212,354550,354562,355648,356623,357450,352115,354086,354909,355214,355331,356759,357099,357149,351171,351655,352957,353084,353716,354016,354670,358291,351056,351219,352947,353838,355070,356141,356169,357847,350313,350442,350900,351041,352184,354737,355817,356099,356934,357299,357933,359097,349751,351006,351330,351616,351669,351702,352389,354654,354910,355213,356047,356259,356447,357041,358900,359413,350381,350809,350823,350887,352113,353083,353155,353981,354768,354825,356351,356587,357594,357614,357717,357750,351712,354183,357596,350755,351167,351482)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
349751 2.35000000
349908 3.54000000
349924 1.22000000
350313 3.54000000
350381 6.60000000
350435 3.71000000
350442 1.22000000
350635 3.37000000
350755 16.75000000
350809 3.71000000
350823 3.88000000
350887 9.27000000
350900 8.47000000
351006 6.43000000
351041 1.67000000
351056 3.88000000
351079 18.45000000
351129 10.17000000
351167 10.34000000
351171 10.17000000
351219 11.02000000
351330 43.95000000
351482 62.65000000
351514 28.65000000
351548 9.32000000
351616 0.82000000
351655 6.90000000
351669 24.57000000
351702 7.62000000
351712 13.35000000
352113 4.39000000
352115 4.73000000
352184 5.58000000
352292 12.33000000
352334 32.95000000
352389 20.15000000
352947 111.95000000
352957 35.45000000
352983 130.65000000
353083 49.05000000
353084 52.45000000
353155 98.35000000
353212 111.95000000
353716 40.55000000
353838 11.02000000
353921 72.85000000
353943 91.55000000
353981 110.25000000
354016 66.05000000
354086 71.15000000
354183 234.35000000
354550 84.75000000
354562 74.55000000
354654 16.07000000
354670 11.65000000
354737 67.75000000
354768 8.13000000
354825 5.75000000
354909 2.35000000
354910 1.84000000
354921 10.17000000
355070 12.04000000
355213 5.07000000
355214 4.22000000
355331 6.99000000
355648 6.43000000
355817 4.05000000
355878 2.52000000
356047 10.00000000
356099 15.73000000
356141 2.01000000
356169 0.82000000
356259 8.13000000
356351 16.29000000
356447 6.26000000
356587 1.22000000
356623 1.22000000
356759 12.55000000
356934 76.25000000
357041 5.07000000
357053 3.88000000
357099 23.04000000
357149 110.25000000
357257 4.22000000
357299 2.52000000
357450 5.58000000
357594 11.54000000
357596 2.92000000
357614 11.54000000
357717 1.33000000
357750 6.26000000
357847 13.06000000
357933 1.84000000
358162 1.22000000
358206 1.33000000
358291 49.05000000
358677 18.45000000
358900 12.38000000
359097 5.07000000
359413 6.26000000