you’re using 'category__and' => array($category_name)
which according to the input becomes 'category__and' => array('594,3')
Here ‘594,3’ is not a valid id
instead try 'category__and' => explode(',', $category_name)
This will make the input as 'category__and' => array('594', '3')