A Class B Hacked Keycard is used to unlock doors that require it. Upon unlocking a door, one keycard is consumed and the door is permanently unlocked (it can still be closed).
Class B cards are somewhat common to find and locked doors for it are not extremely common. Assuming some moderate looting is done occasionally, it is unlikely that B keycards will be scarce.
The first locked door that Albert West encounters in the MPO Prison requires a class B keycard. The prison has a few other class B locks in its prison area, but these all lead to the cell areas which don't hold much in terms of loot.
Randomly generated rooms can also contain doors that require a class B card. However, these rooms are always dead-ends that usually contain some useful items, so a hacked keycard is never required in a randomly generated floor.