UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ro+NIm4iMtG/jutRelVUB0Tmx/WzQT6oXUq3JK3r6Lo='
WHERE
key_id = 'd033418497e3b6798161dcc0b73ef7d4280560b5ceca10ebdb2355eafa5c4cab'
AND (
token = 'Ro+NIm4iMtG/jutRelVUB0Tmx/WzQT6oXUq3JK3r6Lo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)