SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    23051, 23066, 23061, 23038, 23037, 23050, 
    23045, 23032, 23073, 23052, 23023, 
    23056, 23057, 23065, 23064, 23069, 
    23044
  ) 
  AND category_id != 1

Query time 0.00007

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_categories",
          "access_type": "range",
          "possible_keys": ["PRIMARY", "parent", "p_category_id"],
          "key": "parent",
          "key_length": "3",
          "used_key_parts": ["parent_id"],
          "rows": 42,
          "filtered": 100,
          "index_condition": "cscart_categories.parent_id in (23051,23066,23061,23038,23037,23050,23045,23032,23073,23052,23023,23056,23057,23065,23064,23069,23044)",
          "attached_condition": "cscart_categories.category_id <> 1"
        }
      }
    ]
  }
}

Result

category_id parent_id
23024 23023
23025 23023
23026 23023
23027 23023
23028 23023
23029 23023
23030 23023
23031 23023
23033 23032
23034 23032
23035 23032
23036 23032
23039 23038
23040 23038
23041 23038
23042 23038
23043 23038
23046 23045
23047 23045
23048 23045
23049 23045
23053 23052
23054 23052
23055 23052
23058 23057
23059 23057
23060 23057
23062 23061
23063 23061
23067 23066
23068 23066
23070 23069
23071 23069
23072 23069