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 (
    431456, 339702, 387049, 339593, 430751, 
    431148, 430660, 430825, 431127, 430680, 
    430691, 430820, 431013, 430678, 339849, 
    430875, 430959, 431194, 431035, 431041, 
    431044, 431049, 431109, 339483, 339484, 
    431083, 339820, 430737, 430756, 430989, 
    431080, 431161, 430635, 339734, 381698, 
    381699, 430650, 430922, 430808, 430819, 
    430843, 430629, 430657, 430807, 339596, 
    430868, 430921, 431126, 431144, 430795, 
    430928, 431073, 431082, 430789, 430812, 
    430950, 339725, 430658, 430758, 430901, 
    431110, 339674, 430818, 431156, 339774, 
    339728, 339754, 430673, 430689, 430822, 
    430860, 431114, 339821, 339836, 430684, 
    430664, 430769, 430892, 431043, 431066, 
    431169, 339466, 381705, 430842, 430628, 
    430834, 431064, 339843, 339802, 430859, 
    431459, 430906, 381697, 430768, 430890, 
    430962, 431118, 431250, 430703, 430988
  ) 
  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.00160

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 (431456,339702,387049,339593,430751,431148,430660,430825,431127,430680,430691,430820,431013,430678,339849,430875,430959,431194,431035,431041,431044,431049,431109,339483,339484,431083,339820,430737,430756,430989,431080,431161,430635,339734,381698,381699,430650,430922,430808,430819,430843,430629,430657,430807,339596,430868,430921,431126,431144,430795,430928,431073,431082,430789,430812,430950,339725,430658,430758,430901,431110,339674,430818,431156,339774,339728,339754,430673,430689,430822,430860,431114,339821,339836,430684,430664,430769,430892,431043,431066,431169,339466,381705,430842,430628,430834,431064,339843,339802,430859,431459,430906,381697,430768,430890,430962,431118,431250,430703,430988)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
339466 90.00000000
339483 8.00000000
339484 115.00000000
339593 8.00000000
339596 10.00000000
339674 70.00000000
339702 16.00000000
339725 13.00000000
339728 240.00000000
339734 35.00000000
339754 9.00000000
339774 8.00000000
339802 40.00000000
339820 245.00000000
339821 120.00000000
339836 21.00000000
339843 49.00000000
339849 40.00000000
381697 0.00000000
381698 0.00000000
381699 0.00000000
381705 0.00000000
387049 0.00000000
430628 25.50000000
430629 25.50000000
430635 11.50000000
430650 13.50000000
430657 31.50000000
430658 31.50000000
430660 31.50000000
430664 31.50000000
430673 31.50000000
430678 29.90000000
430680 29.90000000
430684 29.90000000
430689 29.90000000
430691 29.90000000
430703 29.90000000
430737 31.50000000
430751 31.50000000
430756 31.50000000
430758 31.50000000
430768 34.50000000
430769 34.50000000
430789 34.50000000
430795 34.50000000
430807 34.50000000
430808 34.50000000
430812 34.50000000
430818 29.90000000
430819 29.90000000
430820 29.90000000
430822 29.90000000
430825 29.90000000
430834 29.90000000
430842 29.90000000
430843 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
430921 31.50000000
430922 31.50000000
430928 31.50000000
430950 31.50000000
430959 31.50000000
430962 31.50000000
430988 31.50000000
430989 31.50000000
431013 31.50000000
431035 31.50000000
431041 29.90000000
431043 29.90000000
431044 29.90000000
431049 29.90000000
431064 29.90000000
431066 29.90000000
431073 28.50000000
431080 26.50000000
431082 28.50000000
431083 26.90000000
431109 31.50000000
431110 31.50000000
431114 31.50000000
431118 17.90000000
431126 17.90000000
431127 17.90000000
431144 29.90000000
431148 29.90000000
431156 31.50000000
431161 31.50000000
431169 26.90000000
431194 29.90000000
431250 36.50000000
431456 29.90000000
431459 29.90000000