if they can prove you were using the phone an hour ago that would probably do it
I ordered a new SIM card which was luckily enough. But sometimes you store something in muscle memory, not number memory.
the prosecution would show up with when you bought the phone, how many times you'd used it, that you used it 80 times in the last hour, and so on
and it comes down to whether or not a jury would believe that you had really forgotten it (despite that evidence)
I had gotten used to putting in the passcode without even seeing the screen and completely lost this muscle memory at the time of the accident - likely due to high stress. I did not remember it later either - it was like my mind just rejected the memory and simply couldn't place out what were the exact digits.
Became far more understanding of my parents forgetting stuff after that incident.
Anyways, the point is that you can un-believably forget the phone passcode at a time of stress. Sure, some cool-as-cucumber humans will never forget anything, but the vast majority of people are not like that.