There are a few ways, depending on your character
You could kill Jax, and take the key from him

Not something I'd advice though
You could steal it from him, if playing a pick-pocket.
Lastly - there is a way to spawn items into the game (proberly what you are looking for).
For this - you need to use the console. Confere with your manual on how to enter dm-commands/console commands into the game (usually it is the ~key that activates the console, but national keyboards can cause this to differ).
Then you need to enter the commands as following:
DebugMode 1 (this command is case sensitive, so remember large D and M)
dm_spawnitem m2q2jkey (this will spawn in the key under your mouse cursor, so remember not to place it over a wall or something)
DebugMode 0 (again - large D and M).
And volia - you can pick up the baracks key.
Note that you can also enter these commands by typing in your "chat-box", that is the box just above your quick-menu slots (where it by default is labled "Talk:").
The exception here is that you need to preface all commands with ##.
So if typeing there it would for instance be ##DebugMode 1 ... and so on.
Hope this helps.