Short answer. Yes. Article 1982 of the Civil Code presumes the depositary authorized to open a locked box either when the key has been delivered, or when the depositor's instructions cannot be executed without opening it. Since your situation falls under the second ground, you don't need to have been given the key.
What the law says
When it becomes necessary to open a locked box or receptacle, the depositary is presumed authorized to do so, if the key has been delivered to him
Civil Code, Article 1982 — Presumed Authority to Open. Read the full provision →
What the law says
when the instructions of the depositor as regards the deposit cannot be executed without opening the box or receptacle.
Civil Code, Article 1982 — Presumed Authority to Open. Read the full provision →
Two separate grounds authorize opening the box
Article 1982 gives two distinct grounds, connected by or, for presuming the depositary authorized to open a locked box. The first is tied to the key: when it becomes necessary to open a locked box or receptacle, the depositary is presumed authorized to do so, if the key has been delivered to him. But that is only one of the two grounds, not a precondition that applies to both.
The key-delivered ground is not what applies here
Since you were not given the key, the first ground in Article 1982 does not cover your situation. That does not end the analysis, though, because the article does not require the key to have been delivered before the depositary can ever be authorized to open the box; it offers a second, entirely independent basis as well, which is the one that actually applies to you.
The instructions-cannot-be-carried-out ground is the one that fits
The second ground is: when the instructions of the depositor as regards the deposit cannot be executed without opening the box or receptacle. That describes exactly what you are facing: the depositor's instructions cannot actually be carried out without looking inside. This ground does not mention the key at all, so its absence does not stand in your way of relying on it.
What 'presumed authorized' means for you
Because your situation falls under the second ground, Article 1982 presumes you authorized to open the locked box, even without having been given the key. The presumption exists specifically because carrying out the depositor's instructions requires it, not because you were separately entrusted with the means of access. Opening the box in that setting is treated as something the depositor impliedly allowed, by giving instructions that could not otherwise be carried out at all.
Why the article frames this as a presumption
Article 1982 speaks of the depositary being presumed authorized, rather than simply declaring the act lawful outright. That framing still protects you when opening the box was genuinely necessary to carry out the depositor's instructions, while leaving room for the depositor to show, in an unusual case, that the presumption should not hold on the particular facts involved. Even so, the sensible course is to open it only so far as carrying out the instructions actually requires.