Unfortunately, Liquid has a poor implementation of boolean algebra.
Using Liquid's operators and tags, here is a dirty way to achieve it:
{% if include.featured == true and product.featured == true %}
{% assign test = true %}
{% endif %}
{% if include.featured == false and product.featured == false %}
{% assign test = true %}
{% endif %}
{% if test %}
Yepeeee!
{% endif %}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…