SELECT 
  category_id 
FROM 
  cscart_categories 
WHERE 
  id_path REGEXP '(^|/)241(/|$)'

Query time 0.00056

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "cscart_categories",
      "access_type": "ALL",
      "rows": 84,
      "filtered": 100,
      "attached_condition": "cscart_categories.id_path regexp '(^|/)241(/|$)'"
    }
  }
}

Result

category_id
241
242
243
244