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 (
    4774, 4776, 4775, 5006, 4112, 4110, 4109, 
    4111, 4113, 4114, 5108, 5107, 4522, 
    4518, 4521, 4519, 4520, 4930, 4922, 
    4923, 4929, 4924, 5104, 5102
  ) 
  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.00063

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "cscart_product_prices.product_id",
      "temporary_table": {
        "table": {
          "table_name": "cscart_product_prices",
          "access_type": "range",
          "possible_keys": [
            "usergroup",
            "product_id",
            "lower_limit",
            "usergroup_id"
          ],
          "key": "usergroup_id",
          "key_length": "6",
          "used_key_parts": ["usergroup_id", "product_id"],
          "rows": 48,
          "filtered": 100,
          "index_condition": "cscart_product_prices.product_id in (4774,4776,4775,5006,4112,4110,4109,4111,4113,4114,5108,5107,4522,4518,4521,4519,4520,4930,4922,4923,4929,4924,5104,5102) and cscart_product_prices.usergroup_id in (0,1)",
          "attached_condition": "cscart_product_prices.lower_limit = 1"
        }
      }
    }
  }
}

Result

product_id price
4109 15.990000
4110 15.990000
4111 15.990000
4112 15.990000
4113 15.990000
4114 15.990000
4518 28.050000
4519 22.440000
4520 16.270000
4521 93.050000
4522 52.390000
4774 22.390000
4775 22.390000
4776 22.390000
4922 35.910000
4923 323.250000
4924 525.000000
4929 277.710000
4930 372.730000
5006 6.170000
5102 102.110000
5104 29.170000
5107 16.270000
5108 44.880000