When the truck starts decelerating a force starts acting on a box. In order for the box to start sliding force acting on it has to be bigger than a static force of friction.
If the trucks declaration is we have the following force acting on the box:

This force has to be smaller than static friction force:

Where

is static friction coefficient.
Now we can find an answer:
