Since your lease expired, you’re on a month to month rental with a 30 day notice (by you or the landlord.) I would pay my rent but when it came time to leave, and I gave my 30 days notice, I would inform the landlord that since you would have no recourse but to sue him in small claims court if he doesn’t return your security deposit, you are deducting the security deposit from the final months rent. This puts the onus on the landlord to take you to small claims court if he believes you owe him any money, However if he is in default, he’s not going to have anything much in the way of a legal standing and even if he did, he’s not likely to pursue it.
Just my two cents