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 (
    220173, 339556, 254330, 339744, 339676, 
    339576, 339461, 391686, 339748, 392163, 
    387088, 339667, 339645, 151062, 339684, 
    151100, 254331, 339583, 387086, 339588, 
    339708, 387055, 339826, 339454, 339547, 
    339553, 339633, 387090, 339580, 339548, 
    339657, 339777, 339632, 339649, 339711, 
    339743, 339719, 339647, 339716, 339773, 
    339776, 387065, 339474, 339756, 339745, 
    339471, 387054, 265037, 339577, 339848, 
    339666, 339552, 339665, 339669, 339767, 
    339670, 387066, 339833, 339698, 339703, 
    220171, 339557, 339544, 339646, 339651, 
    339749, 339824, 339455, 339628, 339591, 
    387052, 339784, 339549, 339565, 339673, 
    339614, 339789, 339575, 339662, 265040, 
    339595, 339834, 339853, 339653, 339658, 
    339818, 339626, 339631, 339717, 339852, 
    339559, 339470, 339545, 339487, 339542, 
    339822, 339579, 339567, 271697, 339850
  ) 
  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.00173

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 (220173,339556,254330,339744,339676,339576,339461,391686,339748,392163,387088,339667,339645,151062,339684,151100,254331,339583,387086,339588,339708,387055,339826,339454,339547,339553,339633,387090,339580,339548,339657,339777,339632,339649,339711,339743,339719,339647,339716,339773,339776,387065,339474,339756,339745,339471,387054,265037,339577,339848,339666,339552,339665,339669,339767,339670,387066,339833,339698,339703,220171,339557,339544,339646,339651,339749,339824,339455,339628,339591,387052,339784,339549,339565,339673,339614,339789,339575,339662,265040,339595,339834,339853,339653,339658,339818,339626,339631,339717,339852,339559,339470,339545,339487,339542,339822,339579,339567,271697,339850)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
151062 0.00000000
151100 0.00000000
220171 0.00000000
220173 0.00000000
254330 0.00000000
254331 0.00000000
265037 0.00000000
265040 0.00000000
271697 0.00000000
339454 85.00000000
339455 80.00000000
339461 75.00000000
339470 5.50000000
339471 25.00000000
339474 8.50000000
339487 65.00000000
339542 9.00000000
339544 9.00000000
339545 9.00000000
339547 7.00000000
339548 7.00000000
339549 7.00000000
339552 75.00000000
339553 8.00000000
339556 6.00000000
339557 16.00000000
339559 7.00000000
339565 7.00000000
339567 18.00000000
339575 38.00000000
339576 75.00000000
339577 35.00000000
339579 40.00000000
339580 25.00000000
339583 8.00000000
339588 24.00000000
339591 5.50000000
339595 25.00000000
339614 20.00000000
339626 8.00000000
339628 75.00000000
339631 55.00000000
339632 7.00000000
339633 30.00000000
339645 29.00000000
339646 9.00000000
339647 9.00000000
339649 45.00000000
339651 24.00000000
339653 7.00000000
339657 11.00000000
339658 6.50000000
339662 35.00000000
339665 10.00000000
339666 16.00000000
339667 30.00000000
339669 26.00000000
339670 23.00000000
339673 40.00000000
339676 14.00000000
339684 7.00000000
339698 6900.00000000
339703 25.00000000
339708 99.00000000
339711 13.00000000
339716 5.00000000
339717 14.00000000
339719 11.00000000
339743 9.00000000
339744 4.50000000
339745 10.00000000
339748 49.50000000
339749 12.00000000
339756 38.00000000
339767 33.00000000
339773 14.50000000
339776 13.80000000
339777 33.00000000
339784 11.00000000
339789 39.00000000
339818 148.00000000
339822 5.00000000
339824 18.00000000
339826 14.00000000
339833 32.00000000
339834 17.00000000
339848 58.00000000
339850 42.00000000
339852 14.00000000
339853 20.00000000
387052 0.00000000
387054 0.00000000
387055 0.00000000
387065 0.00000000
387066 0.00000000
387086 0.00000000
387088 0.00000000
387090 0.00000000
391686 0.00000000
392163 439.00000000