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 (
    20838, 41136, 41146, 2623, 37897, 37890, 
    41126, 41107, 41129, 41425, 36522, 
    44552, 47432, 36520, 37891, 37883, 
    27368, 37884, 41132, 41118, 41120, 
    37893, 41109, 47433, 47415, 47430
  ) 
  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.00334

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": 26,
          "filtered": 99.9960556,
          "index_condition": "cscart_product_prices.product_id in (20838,41136,41146,2623,37897,37890,41126,41107,41129,41425,36522,44552,47432,36520,37891,37883,27368,37884,41132,41118,41120,37893,41109,47433,47415,47430)",
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
2623 280000.0000
20838 360000.0000
27368 285000.0000
36520 75000.0000
36522 50000.0000
37883 330000.0000
37884 330000.0000
37890 330000.0000
37891 330000.0000
37893 330000.0000
37897 330000.0000
41107 750000.0000
41109 750000.0000
41118 499000.0000
41120 499000.0000
41126 499000.0000
41129 750000.0000
41132 499000.0000
41136 499000.0000
41146 499000.0000
41425 890000.0000
44552 741000.0000
47415 150000.0000
47430 490000.0000
47432 480000.0000
47433 280000.0000