Anomalous b --> s transitions from LHCb data may suggest a new massive gauge boson Z that couples to the left-handed b --> s current, which in turn implies a coupling to the t --> c current. In this paper, we study flavor-changing neutral current (FCNC) decays of the top quark induced by a Z boson, namely t --> c Z, based on a model of the gauged L_mu - L_tau symmetry (the difference between the muon and tauon numbers) with vector-like quarks, which was introduced to explain the anomalous LHCb data. We illustrate that searching for t --> c Z via Z --> mu^+ mu^- with LHC Run 1 data can already probe a parameter region which is unexplored by B physics for the Z mass around O(10) GeV or more. We further extend the model to very light Z with mass below 400 MeV, which is motivated by the muon g-2 anomaly. Taking rare B and K meson decay data into account, we give upper limits on the t --> c Z branching ratio for the light Z case, and discuss about its observability at the LHC. We also scrutinize the possibility that the decay K_L --> pi^0 Z with Z --> nu nubar may lead to apparent violation of the usual Grossman-Nir bound of B(K_L --> pi^0 nu nubar) < 1.4 x 10^-9.