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 (
    431325, 381712, 339825, 431042, 430845, 
    430885, 430976, 431200, 431316, 381711, 
    430756, 430801, 430865, 430887, 430904, 
    430939, 430992, 431003, 431393, 430661, 
    430936, 431238, 431251, 339855, 430753, 
    430836, 431011, 431046, 431061, 431333, 
    430810, 430866, 431029, 431072, 431171, 
    431193, 430932, 431052, 430788, 430809, 
    430905, 430927, 430999, 431192, 431205, 
    431463, 430634, 430749, 430862, 430910, 
    431062, 430870, 430923, 431039, 339726, 
    430794, 431024, 431091, 431314, 431326, 
    431327, 430708, 430714, 431315, 430677, 
    430704, 430853, 430888, 430895, 431028, 
    431098, 431242, 430675, 430687, 430707, 
    430811, 431339, 430641, 430713, 430851, 
    431112, 431365, 430694, 430738, 430782, 
    430827, 430861, 430874, 430937, 431077, 
    431308, 339838, 430947, 431245, 339841, 
    430800, 430852, 430855, 431054, 431129
  ) 
  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.00247

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 (431325,381712,339825,431042,430845,430885,430976,431200,431316,381711,430756,430801,430865,430887,430904,430939,430992,431003,431393,430661,430936,431238,431251,339855,430753,430836,431011,431046,431061,431333,430810,430866,431029,431072,431171,431193,430932,431052,430788,430809,430905,430927,430999,431192,431205,431463,430634,430749,430862,430910,431062,430870,430923,431039,339726,430794,431024,431091,431314,431326,431327,430708,430714,431315,430677,430704,430853,430888,430895,431028,431098,431242,430675,430687,430707,430811,431339,430641,430713,430851,431112,431365,430694,430738,430782,430827,430861,430874,430937,431077,431308,339838,430947,431245,339841,430800,430852,430855,431054,431129)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
339726 10.00000000
339825 30.00000000
339838 70.00000000
339841 12.00000000
339855 12.00000000
381711 60.00000000
381712 60.00000000
430634 11.50000000
430641 11.50000000
430661 31.50000000
430675 31.50000000
430677 29.90000000
430687 29.90000000
430694 29.90000000
430704 29.90000000
430707 29.90000000
430708 29.90000000
430713 29.90000000
430714 29.90000000
430738 31.50000000
430749 31.50000000
430753 31.50000000
430756 31.50000000
430782 34.50000000
430788 34.50000000
430794 34.50000000
430800 34.50000000
430801 34.50000000
430809 34.50000000
430810 34.50000000
430811 34.50000000
430827 29.90000000
430836 29.90000000
430845 29.90000000
430851 29.90000000
430852 29.90000000
430853 29.90000000
430855 29.90000000
430861 29.90000000
430862 29.90000000
430865 29.90000000
430866 29.90000000
430870 29.90000000
430874 29.90000000
430885 31.50000000
430887 31.50000000
430888 31.50000000
430895 45.50000000
430904 45.50000000
430905 45.50000000
430910 45.50000000
430923 31.50000000
430927 31.50000000
430932 31.50000000
430936 31.50000000
430937 31.50000000
430939 31.50000000
430947 31.50000000
430976 31.50000000
430992 31.50000000
430999 31.50000000
431003 31.50000000
431011 31.50000000
431024 31.50000000
431028 31.50000000
431029 31.50000000
431039 29.90000000
431042 29.90000000
431046 29.90000000
431052 29.90000000
431054 29.90000000
431061 29.90000000
431062 29.90000000
431072 28.50000000
431077 26.50000000
431091 31.50000000
431098 31.50000000
431112 31.50000000
431129 17.90000000
431171 26.90000000
431192 26.90000000
431193 29.90000000
431200 29.90000000
431205 29.90000000
431238 31.50000000
431242 31.50000000
431245 31.50000000
431251 36.50000000
431308 45.50000000
431314 45.50000000
431315 49.90000000
431316 49.90000000
431325 67.90000000
431326 67.90000000
431327 67.90000000
431333 67.90000000
431339 40.90000000
431365 49.90000000
431393 49.90000000
431463 31.50000000