UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+qixqnqlUD1ByDtraPowi7d0WvqK+onUfqjWNKWWu0k='
WHERE
key_id = '00e671115169b5131459218e5117141629adbd6b88f7d58914485739bb898c7c'
AND (
token = '+qixqnqlUD1ByDtraPowi7d0WvqK+onUfqjWNKWWu0k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)