Lying to authority figures is something I have gotten good at over the years. These steps are what I do to keep out of trouble. This is going to take some practice before you get it right for yourself. This isn't something you can learn overnight, but if you get good at it, it will save your neck in the end.
Step 1: Stay Calm
Remember, you're innocent even if you're not. You have nothing to worry about.
It helps to convince yourself that you are telling the truth to begin with. You can not be lying if you don't think you're lying. You might be delusional, but that doesn't matter since you have convinced yourself you are telling the truth.