Stealing Secret Syrup

You put the guard in a headlock and drag him away from the front security desk, in case a passer-by sees you holding him at gunpoint.

"Where's the secret formula?" you point the gun at his head and demand.
"It's in the safe in the executive office, back corner, just follow that corridor," the guard replies in a terrified voice.

You march him with the gun at his back to the office he mentioned and say, "I don't see a safe."
"It's hidden behind that painting over there."
"Show me."
The guard touches the edge of the painting and it slides to the right, revealing a safe behind it.

“Good, now put in the code."
"I don't know it, only the executive knows the code," he tries to beg you.
"Yeah right, I don't believe that, I know the security team has all the access keys and codes to the whole building. Do you want me to break every bone in your body until you tell the truth? Or you can just tell me now and save yourself some pain," even though you say this to the guard, you know that you can’t leave him alive either way.
The guard was convinced by your threat, “okay just don't hurt me," he puts in the code, and immediately after you hear the confirmation sound you shoot him in the back of the head.

You have 1 choice: