Install the Windows Azure AD Module for Windows PowerShell from following link
Logon to office 365 from the proper powershell ( Windows Azure AD Module for Windows PowerShell) by following commands:
Use your Office 365 credentials
Run following two commands
connect-MSOLService -credential $cred
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true
That will turn off password expiration for all of your accounts.