UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vJWAQb/4HmSOI8mrcO9FYniygx3AihcuiVDgcqEVYIg='
WHERE
key_id = '868533818d061b9c97855cfae3d919fb5eede3fd6938b26fcd774fe9d6e32dd5'
AND (
token = 'vJWAQb/4HmSOI8mrcO9FYniygx3AihcuiVDgcqEVYIg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)