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 (
    431129, 435509, 430656, 430863, 431338, 
    431423, 430856, 430993, 431051, 431074, 
    431165, 339782, 430688, 430702, 430722, 
    430723, 430778, 430816, 430984, 431247, 
    339718, 339675, 431005, 431027, 430627, 
    430742, 430805, 431007, 431022, 431184, 
    339604, 430720, 430839, 430878, 430933, 
    430994, 431177, 430826, 430991, 431019, 
    431357, 430917, 430990, 431108, 431264, 
    431275, 431426, 430872, 430889, 430897, 
    430918, 430940, 431297, 431345, 430690, 
    430791, 430840, 431220, 431501, 430652, 
    430790, 430835, 430958, 430968, 430977, 
    430979, 431342, 430674, 430804, 430828, 
    430886, 430960, 431138, 431358, 430786, 
    430871, 430969, 430931, 430952, 430972, 
    431006, 431428, 431451, 431467, 339597, 
    430780, 431288, 431336, 431395, 430692, 
    430715, 430770, 430894, 430953, 431503, 
    339846, 387050, 430666, 430726, 431037
  ) 
  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.00201

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 (431129,435509,430656,430863,431338,431423,430856,430993,431051,431074,431165,339782,430688,430702,430722,430723,430778,430816,430984,431247,339718,339675,431005,431027,430627,430742,430805,431007,431022,431184,339604,430720,430839,430878,430933,430994,431177,430826,430991,431019,431357,430917,430990,431108,431264,431275,431426,430872,430889,430897,430918,430940,431297,431345,430690,430791,430840,431220,431501,430652,430790,430835,430958,430968,430977,430979,431342,430674,430804,430828,430886,430960,431138,431358,430786,430871,430969,430931,430952,430972,431006,431428,431451,431467,339597,430780,431288,431336,431395,430692,430715,430770,430894,430953,431503,339846,387050,430666,430726,431037)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
339597 15.00000000
339604 6.00000000
339675 35.00000000
339718 14.00000000
339782 21.00000000
339846 12.00000000
387050 0.00000000
430627 25.50000000
430652 31.50000000
430656 31.50000000
430666 31.50000000
430674 31.50000000
430688 29.90000000
430690 29.90000000
430692 29.90000000
430702 29.90000000
430715 29.90000000
430720 31.50000000
430722 31.50000000
430723 31.50000000
430726 31.50000000
430742 31.50000000
430770 34.50000000
430778 34.50000000
430780 34.50000000
430786 34.50000000
430790 34.50000000
430791 34.50000000
430804 34.50000000
430805 34.50000000
430816 29.90000000
430826 29.90000000
430828 29.90000000
430835 29.90000000
430839 29.90000000
430840 29.90000000
430856 29.90000000
430863 29.90000000
430871 29.90000000
430872 29.90000000
430878 29.90000000
430886 31.50000000
430889 31.50000000
430894 31.50000000
430897 45.50000000
430917 45.50000000
430918 45.50000000
430931 31.50000000
430933 31.50000000
430940 31.50000000
430952 31.50000000
430953 31.50000000
430958 31.50000000
430960 31.50000000
430968 31.50000000
430969 31.50000000
430972 31.50000000
430977 31.50000000
430979 31.50000000
430984 31.50000000
430990 31.50000000
430991 31.50000000
430993 31.50000000
430994 31.50000000
431005 31.50000000
431006 31.50000000
431007 31.50000000
431019 31.50000000
431022 31.50000000
431027 31.50000000
431037 29.90000000
431051 29.90000000
431074 28.50000000
431108 31.50000000
431129 17.90000000
431138 29.90000000
431165 26.90000000
431177 26.90000000
431184 26.90000000
431220 29.90000000
431247 31.50000000
431264 54.50000000
431275 36.50000000
431288 36.50000000
431297 45.50000000
431336 67.90000000
431338 67.90000000
431342 40.90000000
431345 40.90000000
431357 40.90000000
431358 49.90000000
431395 49.90000000
431423 58.90000000
431426 58.90000000
431428 58.90000000
431451 29.90000000
431467 31.50000000
431501 73.90000000
431503 40.90000000
435509 0.00000000