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 (
    415289, 427787, 415302, 427779, 349683, 
    356555, 359422, 357504, 351887, 356656, 
    355713, 354511, 354756, 349842, 354972, 
    358872, 356249, 349973, 387057, 349661, 
    351227, 352595, 354503, 349663, 350115, 
    387058, 349883, 352200, 352526, 351878, 
    351863, 349776, 351988, 352081, 352520, 
    351867, 352070, 352076, 351913, 352066, 
    358690, 351846, 355628, 351888, 355778, 
    349662, 349657, 351884, 350003, 351843, 
    352418, 355851, 351855, 351869, 352693, 
    351849, 351852, 352566, 350196, 351741, 
    352074, 387065, 352500, 351847, 352150, 
    349686, 351868, 351993, 356187, 351278, 
    351918, 351925, 351839, 351919, 351870, 
    352017, 352038, 358758, 355894, 351858, 
    349656, 351996, 352684, 352033, 351225, 
    352375, 349674, 351907, 356543, 351253, 
    351881, 352314, 352067, 358870, 351429, 
    351836, 351914, 351748, 349650, 357134
  ) 
  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.00186

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 (415289,427787,415302,427779,349683,356555,359422,357504,351887,356656,355713,354511,354756,349842,354972,358872,356249,349973,387057,349661,351227,352595,354503,349663,350115,387058,349883,352200,352526,351878,351863,349776,351988,352081,352520,351867,352070,352076,351913,352066,358690,351846,355628,351888,355778,349662,349657,351884,350003,351843,352418,355851,351855,351869,352693,351849,351852,352566,350196,351741,352074,387065,352500,351847,352150,349686,351868,351993,356187,351278,351918,351925,351839,351919,351870,352017,352038,358758,355894,351858,349656,351996,352684,352033,351225,352375,349674,351907,356543,351253,351881,352314,352067,358870,351429,351836,351914,351748,349650,357134)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
349650 1.33000000
349656 1.33000000
349657 2.52000000
349661 11.87000000
349662 9.49000000
349663 9.49000000
349674 4.56000000
349683 2.45000000
349686 3.20000000
349776 2.35000000
349842 2.35000000
349883 4.39000000
349973 3.47000000
350003 1.22000000
350115 5.92000000
350196 7.62000000
351225 21.39000000
351227 20.15000000
351253 84.75000000
351278 15.05000000
351429 6.60000000
351741 0.65000000
351748 18.45000000
351836 10.00000000
351839 7.96000000
351843 83.05000000
351846 55.85000000
351847 55.85000000
351849 49.05000000
351852 49.05000000
351855 20.37000000
351858 5.07000000
351863 2.52000000
351867 2.45000000
351868 2.35000000
351869 3.13000000
351870 3.37000000
351878 5.41000000
351881 4.05000000
351884 3.71000000
351887 6.77000000
351888 12.89000000
351907 6.60000000
351913 11.02000000
351914 4.90000000
351918 3.03000000
351919 6.77000000
351925 9.83000000
351988 9.32000000
351993 1.33000000
351996 1.33000000
352017 5.41000000
352033 1.67000000
352038 2.01000000
352066 1.67000000
352067 1.67000000
352070 2.69000000
352074 1.16000000
352076 2.18000000
352081 3.71000000
352150 5.07000000
352200 15.78000000
352314 16.75000000
352375 77.95000000
352418 24.57000000
352500 47.35000000
352520 38.85000000
352526 42.25000000
352566 62.65000000
352595 50.75000000
352684 19.64000000
352693 12.72000000
354503 16.75000000
354511 10.17000000
354756 4.22000000
354972 33.75000000
355628 15.27000000
355713 28.65000000
355778 11.65000000
355851 6.99000000
355894 4.56000000
356187 5.24000000
356249 8.13000000
356543 8.47000000
356555 21.22000000
356656 9.83000000
357134 11.70000000
357504 2.69000000
358690 6.77000000
358758 13.91000000
358870 5.92000000
358872 10.34000000
359422 2.69000000
387057 0.00000000
387058 0.00000000
387065 0.00000000
415289 18.20000000
415302 12.14000000
427779 16.18000000
427787 20.02000000