SELECT 
  MIN(price) AS min_price, 
  MAX(price) AS max_price 
FROM 
  cscart_product_prices 
WHERE 
  product_id IN (
    301, 302, 289, 300, 317, 318, 311, 310, 
    307, 306, 345, 340, 341, 342, 344, 345, 
    290, 336, 292, 293, 332, 334, 335
  )

Query time 0.00059

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "52.81"
    },
    "table": {
      "table_name": "cscart_product_prices",
      "access_type": "range",
      "possible_keys": [
        "usergroup",
        "product_id"
      ],
      "key": "usergroup",
      "used_key_parts": [
        "product_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 22,
      "rows_produced_per_join": 22,
      "filtered": "100.00",
      "index_condition": "(`atulecarter_atul_demo1`.`cscart_product_prices`.`product_id` in (301,302,289,300,317,318,311,310,307,306,345,340,341,342,344,345,290,336,292,293,332,334,335))",
      "cost_info": {
        "read_cost": "48.41",
        "eval_cost": "4.40",
        "prefix_cost": "52.81",
        "data_read_per_join": "528"
      },
      "used_columns": [
        "product_id",
        "price"
      ]
    }
  }
}

Result

min_price max_price
800.00 9999.00