I think this solution may not be efficient but it serves the purpose and adds flexibility with the border width.
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="40dp"
android:layout_gravity="center"
card_view:cardBackgroundColor="@color/some_color"
card_view:cardCornerRadius="20dp"
card_view:contentPadding="5dp"> <!-- Change it to customize the border width -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
card_view:cardCornerRadius="20dp"
card_view:contentPadding="5dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Add your UI elements -->
</RelativeLayout>
</android.support.v7.widget.CardView>
</android.support.v7.widget.CardView>