Key lock with rotating bar for hinged door cabinets