This is unusual in some parts. The total quantity showing 30 is expected when the stock is "synchronized" as the total stock is equal to the sum of the variants. There are reasons where/when it may be desired for that quantity to be different, but basically as a variant is removed so is one of the total quantity. So use that information as seen fit.
From that point, the indication of a quantity being out-of-stock or not is then expected to be processed by the observer class that is looking for the notifier at the end of includes/modules/pages/shopping_cart/header_php.php so that SBA can evaluate if this one variant (per product in the cart) has sufficient quantity remaining. It evaluates whether the condition of the cart to consider what if any SBA tracked items are in stock or not and in particular evaluates whether the cart as a whole has any out-of-stock product and corrects the condition if there is something about the SBA product to identify that all is "okay".
Now in earlier versions, there used to be a modification to that header_php.php file; however, a method was determined possible to perform the determination later. Problem I'm having right now is what is identifying that 1 of even 5 or 30 items is causing the software to consider that there are no product available.
One thing that comes to mind is if there are attributes in the product/provided to the shopping cart for which no variant respects... Not having a matching variant or method to handle the other attributes would cause what is described...
Do you perhaps have "display only" type option values/names? or better asked, is there a Web page to look at for the problem product and/or can you identify the attribute and variant setup for this product?
Bookmarks