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 (
    339484, 339755, 430807, 431068, 339697, 
    431359, 430875, 431041, 430825, 430868, 
    431085, 431156, 339681, 339828, 430925, 
    431053, 431164, 381705, 430819, 430820, 
    430901, 431013, 431049, 339596, 430654, 
    430658, 431144, 431148, 430691, 430989, 
    430746, 430808, 430812, 430834, 430629, 
    430680, 431136, 339774, 339765, 430843, 
    339728, 339836, 339843, 431110, 339725, 
    339734, 339816, 431080, 339655, 339839, 
    339599, 431118, 431161, 339466, 430673, 
    430890, 339845, 430789, 430859, 430906, 
    430922, 339582, 339723, 431082, 431126, 
    430657, 430678, 339702, 430737, 430822, 
    430860, 431111, 339674, 430689, 431044, 
    339754, 381704, 430795, 430832, 430892, 
    430914, 430921, 430635, 339802, 339821, 
    430663, 430838, 430854, 431174, 339486, 
    430650, 430959, 431456, 430815, 339727, 
    381697, 431169, 430672, 430695, 430950
  ) 
  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.00153

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 (339484,339755,430807,431068,339697,431359,430875,431041,430825,430868,431085,431156,339681,339828,430925,431053,431164,381705,430819,430820,430901,431013,431049,339596,430654,430658,431144,431148,430691,430989,430746,430808,430812,430834,430629,430680,431136,339774,339765,430843,339728,339836,339843,431110,339725,339734,339816,431080,339655,339839,339599,431118,431161,339466,430673,430890,339845,430789,430859,430906,430922,339582,339723,431082,431126,430657,430678,339702,430737,430822,430860,431111,339674,430689,431044,339754,381704,430795,430832,430892,430914,430921,430635,339802,339821,430663,430838,430854,431174,339486,430650,430959,431456,430815,339727,381697,431169,430672,430695,430950)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
339466 90.00000000
339484 115.00000000
339486 23.00000000
339582 6.50000000
339596 10.00000000
339599 20.00000000
339655 18.00000000
339674 70.00000000
339681 65.00000000
339697 15.00000000
339702 16.00000000
339723 9.00000000
339725 13.00000000
339727 11.00000000
339728 240.00000000
339734 35.00000000
339754 9.00000000
339755 9.00000000
339765 75.00000000
339774 8.00000000
339802 40.00000000
339816 75.00000000
339821 120.00000000
339828 16.00000000
339836 21.00000000
339839 39.00000000
339843 49.00000000
339845 112.00000000
381697 0.00000000
381704 0.00000000
381705 0.00000000
430629 25.50000000
430635 11.50000000
430650 13.50000000
430654 31.50000000
430657 31.50000000
430658 31.50000000
430663 31.50000000
430672 31.50000000
430673 31.50000000
430678 29.90000000
430680 29.90000000
430689 29.90000000
430691 29.90000000
430695 29.90000000
430737 31.50000000
430746 31.50000000
430789 34.50000000
430795 34.50000000
430807 34.50000000
430808 34.50000000
430812 34.50000000
430815 29.90000000
430819 29.90000000
430820 29.90000000
430822 29.90000000
430825 29.90000000
430832 29.90000000
430834 29.90000000
430838 29.90000000
430843 29.90000000
430854 29.90000000
430859 29.90000000
430860 29.90000000
430868 29.90000000
430875 29.90000000
430890 31.50000000
430892 31.50000000
430901 45.50000000
430906 45.50000000
430914 45.50000000
430921 31.50000000
430922 31.50000000
430925 31.50000000
430950 31.50000000
430959 31.50000000
430989 31.50000000
431013 31.50000000
431041 29.90000000
431044 29.90000000
431049 29.90000000
431053 29.90000000
431068 29.90000000
431080 26.50000000
431082 28.50000000
431085 28.50000000
431110 31.50000000
431111 31.50000000
431118 17.90000000
431126 17.90000000
431136 29.90000000
431144 29.90000000
431148 29.90000000
431156 31.50000000
431161 31.50000000
431164 26.90000000
431169 26.90000000
431174 26.90000000
431359 49.90000000
431456 29.90000000