Shelter-in-place and lockdowns have been some of the main non-pharmaceutical interventions that governments around the globe have implemented to contain the COVID-19 pandemic. In this paper we study the impact of such interventions in the capital of a developing country, Santiago, Chile, that exhibits large socioeconomic inequality. A distinctive feature of our study is that we use granular geo-located cell-phone data to measure shelter-at-home behavior as well as trips within the city, thereby allowing to capture the adherence to lockdowns. Using panel data linear regression models we first show that a 10\% reduction in mobility implies a 13-26\% reduction in infections. However, the impact of social distancing measures and lockdowns on mobility is highly heterogeneous and dependent on socioeconomic level. While high income zones can exhibit reductions in mobility of around 60-80\% (significantly driven by voluntary lockdowns), lower income zones only reduce mobility by 20-40\%. Our results show that failing to acknowledge the heterogeneous effect of shelter-in-place behavior even within a city can have dramatic consequences in the contention of the pandemic. It also confirms the challenges of implementing mandatory lockdowns in lower-income communities, where people generate their income from their daily work. To be effective, lockdowns in counties of low socioeconomic levels may need to be complemented with other measures that support their inhabitants, providing aid to increase compliance.