UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Poa5l6lgdHFlzOJWNUPc/FxkhMdCbbTbPWO/QIfhJzU='
WHERE
key_id = '8a356f069b4f24ce8cff08535a8c3f4ef5885d74a227acd8a2e43e6990f4b1e4'
AND (
token = 'Poa5l6lgdHFlzOJWNUPc/FxkhMdCbbTbPWO/QIfhJzU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)