UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ysslGEOR7u6g+26kcgONnqyGiQhbxJid1QNgdGDVZpg='
WHERE
key_id = '9aab5a9b9f17d0adb1df6b5ede6531b03a1e76df007b52ef686cb5f9ea0924c6'
AND (
token = 'ysslGEOR7u6g+26kcgONnqyGiQhbxJid1QNgdGDVZpg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)