UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+ajkSWCZ8blVsAdsO1DBG/QfyGAh2AW7qiUvXy/rtJo='
WHERE
key_id = '5ab8ec4ea16e2eaa9b153e9461279db43131543c979e01978415788710a67f24'
AND (
token = '+ajkSWCZ8blVsAdsO1DBG/QfyGAh2AW7qiUvXy/rtJo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)