Cash basis S Corp - when do i deduct FICA paid by the company? The year paid or the year that the corp incurred the liablity?

My S Corp paid the employer portion of my employee's 2017 FICA taxes in 2018 and the 2018 FICA taxes in 2019. The company is setup on cash basis accounting but i know there are exceptions to when expenses/deductions are taken for things like funding the employee's 401K. Do i take the expense for FICA taxes in the tax year they represent or the year actually paid? Thanks!