We study superconductivity in an ultracold Bose-Fermi mixture loaded into a square optical lattice subjected to a staggered flux. While the bosons form a superfluid at very low temperature and weak interaction, the interacting fermions experience an additional long-ranged attractive interaction mediated by phonons in the bosonic superfluid. This leads us to consider a generalized Hubbard model with on-site and nearest-neighbor attractive interactions, which give rise to two competing superconducting channels. We use the Bardeen-Cooper-Schrieffer theory to determine the regimes where distinct superconducting ground states are stabilized, and find that the non-local pairing channel favors a superconducting ground state which breaks both the gauge and the lattice symmetries, thus realizing unconventional superconductivity. Furthermore, the particular structure of the single-particle spectrum leads to unexpected consequences, for example, a dome-shaped superconducting region in the temperature versus filing fraction phase diagram, with a normal phase that comprises much richer physics than a Fermi-liquid. Notably, the relevant temperature regime and coupling strength is readily accessible in state of the art experiments with ultracold trapped atoms.