SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    829, 830, 831, 832, 833, 834, 835, 836, 
    837, 838, 839, 840, 841, 842, 843, 844, 
    845, 846, 847, 848, 849, 850, 851, 852, 
    853, 854, 1296
  ) 
  AND category_id != 265

Query time 0.00040

JSON explain

{
  "query_block": {
    "select_id": 1,
    "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": 27,
      "filtered": 100,
      "index_condition": "cscart_categories.parent_id in (829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,1296)",
      "attached_condition": "cscart_categories.category_id <> 265"
    }
  }
}