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 (
    5006, 4116, 4136, 4115, 4127, 4121, 4120, 
    4087, 4122, 4119, 4126, 4086, 4118, 
    4117, 4084, 5883, 4088
  ) 
  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.00050

JSON explain

{
  "query_block": {
    "select_id": 1,
    "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": 35,
      "filtered": 97.14286041,
      "index_condition": "cscart_product_prices.product_id in (5006,4116,4136,4115,4127,4121,4120,4087,4122,4119,4126,4086,4118,4117,4084,5883,4088)",
      "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
    }
  }
}

Result

product_id price
4084 123.100000
4086 19.440000
4087 21.600000
4088 28.080000
4115 123.100000
4116 85.690000
4117 127.200000
4118 127.200000
4119 34.560000
4120 32.000000
4121 21.600000
4122 20.000000
4126 32.400000
4127 85.320000
4136 16.180000
5006 6.170000
5883 449.000000