When the famous UPS stops syncing with AD, the best option is to unprovision and Provision Sync DB. And below is the powershell script to accomplish that.
Get-SPDatabase $syncdb=Get-SPDatabase -Id
$syncdb.Unprovision()
$syncdb.Status=’Offline’
Get-SPServiceApplication
$upa=Get-SPServiceApplication – Id
$upa.ResetSynchronizationMachine()
$upa.ResetSynchronizationDatabase()
$syncdb.Provision()