UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dzR5/x228wZxOFG4alJ4Cw4MfXZoBkYVsXh/ctgaJ8k='
WHERE
key_id = '96305c79858a2272c1f7306dd321c07460a6b26284aab5694b765c6d04843b60'
AND (
token = 'dzR5/x228wZxOFG4alJ4Cw4MfXZoBkYVsXh/ctgaJ8k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)