UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rASNgaNTeBiZioEoUiXbz5xYrQ+uHeU6qTFN/ol4PCg='
WHERE
key_id = 'fc72ffc41598aed8672dea93284a26b548d3a7fca0397c5432f4e69d7a0d0c69'
AND (
token = 'rASNgaNTeBiZioEoUiXbz5xYrQ+uHeU6qTFN/ol4PCg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)