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 (
    1781, 3620, 35254, 20932, 47598, 6558, 
    6559, 6554, 6555, 6367, 3975, 1784, 
    18748, 35187, 40760, 992, 5998, 2805, 
    5765, 1517, 18749, 18747, 2163, 41017, 
    6543, 38129, 5759, 40309, 47652, 5770, 
    41418, 5635
  ) 
  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.00294

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_product_prices",
          "access_type": "range",
          "possible_keys": [
            "usergroup",
            "product_id",
            "lower_limit",
            "usergroup_id"
          ],
          "key": "product_id",
          "key_length": "3",
          "used_key_parts": ["product_id"],
          "rows": 32,
          "filtered": 99.9960556,
          "index_condition": "cscart_product_prices.product_id in (1781,3620,35254,20932,47598,6558,6559,6554,6555,6367,3975,1784,18748,35187,40760,992,5998,2805,5765,1517,18749,18747,2163,41017,6543,38129,5759,40309,47652,5770,41418,5635)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
992 890000.0000
1517 535000.0000
1781 999000.0000
1784 999000.0000
2163 550000.0000
2805 815000.0000
3620 550000.0000
3975 825000.0000
5635 850000.0000
5759 700000.0000
5765 901600.0000
5770 744800.0000
5998 620000.0000
6367 880000.0000
6543 825000.0000
6554 590000.0000
6555 590000.0000
6558 590000.0000
6559 709000.0000
18747 748000.0000
18748 898000.0000
18749 768000.0000
20932 750000.0000
35187 699000.0000
35254 995000.0000
38129 850000.0000
40309 580000.0000
40760 579000.0000
41017 680000.0000
41418 900000.0000
47598 605000.0000
47652 645000.0000