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 (
    431199, 392169, 339707, 430908, 431115, 
    339829, 431133, 339758, 339809, 339769, 
    339677, 339729, 381702, 431050, 431150, 
    339807, 431158, 339648, 431026, 430747, 
    431195, 339479, 430748, 339851, 430681, 
    339712, 339746, 381696, 339847, 430924, 
    431102, 431122, 430907, 339654, 339704, 
    339664, 339735, 430696, 431201, 430648, 
    339760, 339485, 430824, 430916, 387047, 
    430771, 339720, 339817, 430636, 430638, 
    430915, 430998, 431139, 339812, 430646, 
    430857, 431120, 430743, 339835, 430831, 
    430935, 339714, 430803, 430821, 430823, 
    431151, 430813, 381698, 339668, 339715, 
    431145, 387049, 430649, 430665, 430751, 
    381699, 339671, 339820, 431127, 431109, 
    339761, 430647, 339694, 339650, 430848, 
    430766, 339593, 431114, 430660, 430817, 
    339849, 430903, 431097, 431103, 430902, 
    431163, 431194, 339484, 339755, 430818
  ) 
  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.00174

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 (431199,392169,339707,430908,431115,339829,431133,339758,339809,339769,339677,339729,381702,431050,431150,339807,431158,339648,431026,430747,431195,339479,430748,339851,430681,339712,339746,381696,339847,430924,431102,431122,430907,339654,339704,339664,339735,430696,431201,430648,339760,339485,430824,430916,387047,430771,339720,339817,430636,430638,430915,430998,431139,339812,430646,430857,431120,430743,339835,430831,430935,339714,430803,430821,430823,431151,430813,381698,339668,339715,431145,387049,430649,430665,430751,381699,339671,339820,431127,431109,339761,430647,339694,339650,430848,430766,339593,431114,430660,430817,339849,430903,431097,431103,430902,431163,431194,339484,339755,430818)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
339479 10.50000000
339484 115.00000000
339485 115.00000000
339593 8.00000000
339648 5.50000000
339650 35.00000000
339654 6.00000000
339664 12.00000000
339668 28.00000000
339671 24.00000000
339677 27.00000000
339694 5.00000000
339704 46.00000000
339707 34.00000000
339712 7.00000000
339714 3.50000000
339715 6.50000000
339720 18.00000000
339729 35.00000000
339735 45.00000000
339746 98.00000000
339755 9.00000000
339758 80.00000000
339760 34.00000000
339761 70.00000000
339769 40.00000000
339807 34.00000000
339809 34.00000000
339812 100.00000000
339817 47.00000000
339820 245.00000000
339829 42.00000000
339835 42.00000000
339847 7.00000000
339849 40.00000000
339851 19.00000000
381696 0.00000000
381698 0.00000000
381699 0.00000000
381702 0.00000000
387047 0.00000000
387049 0.00000000
392169 129.00000000
430636 11.50000000
430638 11.50000000
430646 13.50000000
430647 13.50000000
430648 13.50000000
430649 13.50000000
430660 31.50000000
430665 31.50000000
430681 29.90000000
430696 29.90000000
430743 31.50000000
430747 31.50000000
430748 31.50000000
430751 31.50000000
430766 34.50000000
430771 34.50000000
430803 34.50000000
430813 34.50000000
430817 29.90000000
430818 29.90000000
430821 29.90000000
430823 29.90000000
430824 29.90000000
430831 29.90000000
430848 29.90000000
430857 29.90000000
430902 45.50000000
430903 45.50000000
430907 45.50000000
430908 45.50000000
430915 45.50000000
430916 45.50000000
430924 31.50000000
430935 31.50000000
430998 31.50000000
431026 31.50000000
431050 29.90000000
431097 31.50000000
431102 31.50000000
431103 31.50000000
431109 31.50000000
431114 31.50000000
431115 31.50000000
431120 17.90000000
431122 17.90000000
431127 17.90000000
431133 17.90000000
431139 29.90000000
431145 29.90000000
431150 31.50000000
431151 31.50000000
431158 31.50000000
431163 31.50000000
431194 29.90000000
431195 29.90000000
431199 29.90000000
431201 29.90000000