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 (
    20845, 20846, 20847, 20848, 20849, 20850, 
    20851, 20852, 20853, 20854, 20855, 
    20856, 20857, 20858, 20859, 20860
  ) 
  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.00036

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": 16,
      "filtered": 99.99243927,
      "index_condition": "cscart_product_prices.product_id in (20845,20846,20847,20848,20849,20850,20851,20852,20853,20854,20855,20856,20857,20858,20859,20860)",
      "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,1)"
    }
  }
}

Result

product_id price
20845 178900.00000000
20846 400.00000000
20847 0.00000000
20848 0.00000000
20849 204100.00000000
20850 0.00000000
20851 192500.00000000
20852 0.00000000
20853 0.00000000
20854 0.00000000
20855 178900.00000000
20856 192500.00000000
20857 282000.00000000
20858 0.00000000
20859 282000.00000000
20860 183900.00000000