Get only one of the current categories

get_the_category should be returning all of the categories for your post, but you are only picking one of them, the first one, when you do this– $category = $category[0]->cat_ID;. Instead of that line try:

$allcats = array();
foreach ($category as $cat) {
  if (29 != $cat->cat_ID && 35 != $cat->cat_ID) {
    $allcats[] = $cat->cat_ID;
  }
}
$myposts = get_posts(
  array(
    'numberposts' => 5, 
    'offset' => 0, 
    'category__in' => $allcats,  
    'post_status'=>'publish', 'order'=>'ASC' 
));

error code: 523