I thought you had to be 59 1/2 yrs old to avoid the penalty.
No, if you are laid off or out of a job at the age of 55 and you have a 401K with that company, you can cash out. It was with that company.
Can’t swear that is the case for other 401K’s but actually I think you can do that with any 401K after the age of 55.
Worked for me and enjoyed a 10 year golf vacation after giving up on finding a job at that age. Good luck.
Search 401k and 55 and you will find the information. It applied to me, not sure if it applies to you.