I agree with your book. Your versions with would are perfectly correct sentences, but they're not correct answers, because the past tense of shall is should. Consider these sentences:
(A) I said, "I'm sleepy."
(B) I said, "I feel sleepy."
The corresponding versions with indirect speech instead of direct speech would be:
(C) I said that I was sleepy.
(D) I said that I felt sleepy.
All four of these sentences are basically equivalent, but it's clear that (C) corresponds to (A) and (D) to (B). Just because we're changing from direct speech to indirect speech, that doesn't mean we should change from be to feel or vice versa.
In your first case (though not your second), there is an additional change besides tense; as you note, the version with direct speech uses the first person ("I shall"), whereas the version with indirect speech uses the third person ("he should"). Given that the choice of shall vs. will is often affected by the person of the subject, I can understand why you would think it would make a difference; but when we are attributing statements to other people, even in indirect speech, we generally preserve those aspects of their word choice. Although I would not say "He shall unlock […]", he said "I shall unlock […]", and so in indirect speech, I preserve the shall (but using its past tense form, should).
This property of indirect speech — whereby we take the perspective of the speaker, and use words that represent his/her speech faithfully — is not absolute, but it is nonetheless fairly strong; so strong, in fact, that we even have something called "free indirect speech", where there is no explicit marker of indirect speech (such as "he said"), but rather, it is merely made obvious by the perspective-taking language. The "Free indirect speech" article on Wikipedia gives a few examples of how this works.