UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kpKXe2c4wnD/dtN8jT6qrlUIS9ZiTOn0pEo52tKBzbI='
WHERE
key_id = 'aa3008baaa6a6e4f7b8164bcb81800752187b6f00d41018003d8b8adb153b191'
AND (
token = 'kpKXe2c4wnD/dtN8jT6qrlUIS9ZiTOn0pEo52tKBzbI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)