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, 431132, 265042, 339796, 339541, 
    339477, 339457, 339700, 431202, 431162, 
    339811, 339489, 339458, 431128, 431099, 
    339623, 431155, 392172, 339453, 339797, 
    339606, 339798, 339699, 430639, 431141, 
    339643, 339469, 392167, 431130, 431168, 
    339482, 339685, 431153, 339730, 431154, 
    339731, 431137, 431096, 339463, 381703, 
    392175, 339709, 431124, 339460, 430637, 
    431125, 381725, 339478, 339468, 431094, 
    339467, 430745, 431146, 339810, 430911, 
    339753, 431134, 430640, 431048, 339696, 
    431033, 431187, 339806, 339805, 339757, 
    339794, 339701, 339808, 431191, 430697, 
    430767, 431067, 431117, 339464, 339787, 
    381701, 431157, 431104, 381687, 431090, 
    392166, 431107, 431116, 431204, 339452, 
    431196, 431065, 339752, 339814, 430744, 
    431084, 339695, 339750, 431203, 431176, 
    339656, 431100, 431199, 430655, 431160
  ) 
  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.00155

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,431132,265042,339796,339541,339477,339457,339700,431202,431162,339811,339489,339458,431128,431099,339623,431155,392172,339453,339797,339606,339798,339699,430639,431141,339643,339469,392167,431130,431168,339482,339685,431153,339730,431154,339731,431137,431096,339463,381703,392175,339709,431124,339460,430637,431125,381725,339478,339468,431094,339467,430745,431146,339810,430911,339753,431134,430640,431048,339696,431033,431187,339806,339805,339757,339794,339701,339808,431191,430697,430767,431067,431117,339464,339787,381701,431157,431104,381687,431090,392166,431107,431116,431204,339452,431196,431065,339752,339814,430744,431084,339695,339750,431203,431176,339656,431100,431199,430655,431160)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
265042 0.00000000
339452 18.00000000
339453 23.00000000
339457 100.00000000
339458 100.00000000
339460 75.00000000
339463 95.00000000
339464 10.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
339623 4.00000000
339643 19.00000000
339656 22.00000000
339678 6.50000000
339685 280.00000000
339695 22.00000000
339696 19.00000000
339699 70.00000000
339700 110.00000000
339701 85.00000000
339709 50.00000000
339730 165.00000000
339731 200.00000000
339750 40.00000000
339752 36.00000000
339753 85.00000000
339757 140.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
339811 75.00000000
339814 58.00000000
381687 0.00000000
381701 0.00000000
381703 0.00000000
381725 20.00000000
392166 12.00000000
392167 7.00000000
392172 89.00000000
392175 109.00000000
430637 11.50000000
430639 11.50000000
430640 11.50000000
430655 31.50000000
430697 29.90000000
430744 31.50000000
430745 31.50000000
430767 34.50000000
430911 45.50000000
431033 31.50000000
431048 29.90000000
431065 29.90000000
431067 29.90000000
431084 26.90000000
431090 31.50000000
431094 31.50000000
431096 31.50000000
431099 31.50000000
431100 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
431176 26.90000000
431187 26.90000000
431191 26.90000000
431196 29.90000000
431199 29.90000000
431202 29.90000000
431203 29.90000000
431204 29.90000000