UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SHIxDb5UoLMw+qNZQNK49ztsoujWZFl5xcyM9esMXxU='
WHERE
key_id = 'af0d26813ba8fd907caa3b043a9c9fcf8c43945001f4b7dac1e937b1d27658c2'
AND (
token = 'SHIxDb5UoLMw+qNZQNK49ztsoujWZFl5xcyM9esMXxU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)