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 (
    339776, 339474, 339552, 339649, 339743, 
    339756, 339647, 339665, 339470, 339773, 
    339577, 339848, 339703, 339749, 339669, 
    339455, 339666, 339789, 339651, 339565, 
    339544, 339626, 339670, 339543, 339646, 
    339824, 339833, 339834, 339575, 339784, 
    339698, 339830, 339631, 339628, 339662, 
    339767, 339557, 339567, 339549, 339595, 
    339823, 339673, 339853, 339658, 339717, 
    339763, 339852, 339542, 339818, 339653, 
    339487, 339822, 339472, 339613, 339682, 
    339480, 339555, 339639, 339560, 339579, 
    339680, 339559, 339788, 339850, 339854, 
    339815, 339772, 339561, 339785, 339766, 
    339475, 339688, 339566, 339661, 339558, 
    339819, 339585, 339837, 339563, 339640, 
    339568, 339790, 339578, 339634, 339598, 
    339629, 339672, 339546, 339844, 339641, 
    339832, 339840, 339624, 339627, 339687, 
    339842, 339612, 339827, 339642, 339800
  ) 
  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.00192

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 (339776,339474,339552,339649,339743,339756,339647,339665,339470,339773,339577,339848,339703,339749,339669,339455,339666,339789,339651,339565,339544,339626,339670,339543,339646,339824,339833,339834,339575,339784,339698,339830,339631,339628,339662,339767,339557,339567,339549,339595,339823,339673,339853,339658,339717,339763,339852,339542,339818,339653,339487,339822,339472,339613,339682,339480,339555,339639,339560,339579,339680,339559,339788,339850,339854,339815,339772,339561,339785,339766,339475,339688,339566,339661,339558,339819,339585,339837,339563,339640,339568,339790,339578,339634,339598,339629,339672,339546,339844,339641,339832,339840,339624,339627,339687,339842,339612,339827,339642,339800)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
339455 80.00000000
339470 5.50000000
339472 10.00000000
339474 8.50000000
339475 12.00000000
339480 45.00000000
339487 65.00000000
339542 9.00000000
339543 9.00000000
339544 9.00000000
339546 10.00000000
339549 7.00000000
339552 75.00000000
339555 7.00000000
339557 16.00000000
339558 12.00000000
339559 7.00000000
339560 11.00000000
339561 85.00000000
339563 35.00000000
339565 7.00000000
339566 17.00000000
339567 18.00000000
339568 26.00000000
339575 38.00000000
339577 35.00000000
339578 45.00000000
339579 40.00000000
339585 45.00000000
339595 25.00000000
339598 10.00000000
339612 20.00000000
339613 17.00000000
339624 7.00000000
339626 8.00000000
339627 26.00000000
339628 75.00000000
339629 26.00000000
339631 55.00000000
339634 38.00000000
339639 9.50000000
339640 7.50000000
339641 23.00000000
339642 18.00000000
339646 9.00000000
339647 9.00000000
339649 45.00000000
339651 24.00000000
339653 7.00000000
339658 6.50000000
339661 30.00000000
339662 35.00000000
339665 10.00000000
339666 16.00000000
339669 26.00000000
339670 23.00000000
339672 12.50000000
339673 40.00000000
339680 4.50000000
339682 5.00000000
339687 12.00000000
339688 78.00000000
339698 6900.00000000
339703 25.00000000
339717 14.00000000
339743 9.00000000
339749 12.00000000
339756 38.00000000
339763 65.00000000
339766 170.00000000
339767 33.00000000
339772 5.40000000
339773 14.50000000
339776 13.80000000
339784 11.00000000
339785 37.00000000
339788 39.00000000
339789 39.00000000
339790 40.00000000
339800 80.00000000
339815 32.00000000
339818 148.00000000
339819 144.00000000
339822 5.00000000
339823 26.00000000
339824 18.00000000
339827 30.00000000
339830 112.00000000
339832 98.00000000
339833 32.00000000
339834 17.00000000
339837 20.00000000
339840 21.00000000
339842 43.00000000
339844 25.00000000
339848 58.00000000
339850 42.00000000
339852 14.00000000
339853 20.00000000
339854 15.00000000