UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lOGUv/fetmgJXJBkVPSC/xS6KfQJa4MiYGyhokIrWOQ='
WHERE
key_id = '692b1c8b27876638084b46dbf18b252efe47d063d95cfd4133e7e28388834d45'
AND (
token = 'lOGUv/fetmgJXJBkVPSC/xS6KfQJa4MiYGyhokIrWOQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)