On a common generalization of Koszul duality and tilting equivalence