UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LvoG70gDvZWqQa3Uj+BilFa7qeK7FIRKFC/2zfJ8IN8='
WHERE
key_id = 'f6c6443cd9f6b81d4273d6693f8933da43a7d3b6d69dafd08efc32c33ed610c1'
AND (
token = 'LvoG70gDvZWqQa3Uj+BilFa7qeK7FIRKFC/2zfJ8IN8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)