UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3SDZfYb7j6Ch3l7+nD708T41Dfym7UoVKf/DaYUlHhk='
WHERE
key_id = '5c3b9ab160bf3c3e6a45211838d07d914a4cd72b77b214403fab00a81ddc7e3d'
AND (
token = '3SDZfYb7j6Ch3l7+nD708T41Dfym7UoVKf/DaYUlHhk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)