Coupled dynamics of an atom and an optomechanical cavity