Replaced `wpdb::escape()` with `esc_sql()`

`wpdb::escape()` is deprecated since WP 3.6.