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 (
    339678, 220178, 431162, 431128, 339465, 
    339786, 339457, 431132, 339477, 431099, 
    431202, 339541, 339643, 265042, 339796, 
    391798, 392175, 339489, 430637, 430639, 
    431096, 339699, 339469, 339797, 392167, 
    339458, 339798, 339606, 339685, 339482, 
    431168, 431141, 339468, 339453, 431137, 
    431153, 431155, 431130, 431033, 339730, 
    430911, 339731, 430640, 381703, 431134, 
    339478, 431125, 431154, 431090, 339794, 
    431187, 431067, 431146, 339463, 431065, 
    339709, 431094, 431048, 339467, 430767, 
    430697, 431104, 339753, 431050, 339460, 
    381725, 430745, 431124, 431117, 339696, 
    339757, 339464, 339808, 339787, 339806, 
    339805, 392169, 431157, 431191, 339810, 
    431160, 339707, 339701, 339704, 430850, 
    430681, 430743, 431084, 431116, 430908, 
    431107, 392166, 339677, 430998, 339769, 
    339814, 339750, 339758, 430655, 430744
  ) 
  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.00123

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 (339678,220178,431162,431128,339465,339786,339457,431132,339477,431099,431202,339541,339643,265042,339796,391798,392175,339489,430637,430639,431096,339699,339469,339797,392167,339458,339798,339606,339685,339482,431168,431141,339468,339453,431137,431153,431155,431130,431033,339730,430911,339731,430640,381703,431134,339478,431125,431154,431090,339794,431187,431067,431146,339463,431065,339709,431094,431048,339467,430767,430697,431104,339753,431050,339460,381725,430745,431124,431117,339696,339757,339464,339808,339787,339806,339805,392169,431157,431191,339810,431160,339707,339701,339704,430850,430681,430743,431084,431116,430908,431107,392166,339677,430998,339769,339814,339750,339758,430655,430744)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
220178 0.00000000
265042 0.00000000
339453 23.00000000
339457 100.00000000
339458 100.00000000
339460 75.00000000
339463 95.00000000
339464 10.00000000
339465 90.00000000
339467 95.00000000
339468 110.00000000
339469 85.00000000
339477 10.00000000
339478 48.00000000
339482 15.00000000
339489 22.00000000
339541 42.00000000
339606 6.00000000
339643 19.00000000
339677 27.00000000
339678 6.50000000
339685 280.00000000
339696 19.00000000
339699 70.00000000
339701 85.00000000
339704 46.00000000
339707 34.00000000
339709 50.00000000
339730 165.00000000
339731 200.00000000
339750 40.00000000
339753 85.00000000
339757 140.00000000
339758 80.00000000
339769 40.00000000
339786 38.00000000
339787 38.00000000
339794 70.00000000
339796 70.00000000
339797 72.00000000
339798 80.00000000
339805 40.00000000
339806 58.00000000
339808 59.00000000
339810 795.00000000
339814 58.00000000
381703 0.00000000
381725 20.00000000
391798 0.00000000
392166 12.00000000
392167 7.00000000
392169 129.00000000
392175 109.00000000
430637 11.50000000
430639 11.50000000
430640 11.50000000
430655 31.50000000
430681 29.90000000
430697 29.90000000
430743 31.50000000
430744 31.50000000
430745 31.50000000
430767 34.50000000
430850 29.90000000
430908 45.50000000
430911 45.50000000
430998 31.50000000
431033 31.50000000
431048 29.90000000
431050 29.90000000
431065 29.90000000
431067 29.90000000
431084 26.90000000
431090 31.50000000
431094 31.50000000
431096 31.50000000
431099 31.50000000
431104 31.50000000
431107 31.50000000
431116 31.50000000
431117 31.50000000
431124 17.90000000
431125 17.90000000
431128 17.90000000
431130 17.90000000
431132 17.90000000
431134 29.90000000
431137 29.90000000
431141 29.90000000
431146 29.90000000
431153 31.50000000
431154 31.50000000
431155 31.50000000
431157 31.50000000
431160 31.50000000
431162 31.50000000
431168 26.90000000
431187 26.90000000
431191 26.90000000
431202 29.90000000