A multiwavelength view of the galaxy cluster Abell 523 and its peculiar diffuse radio source