UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zh/ZdHHTVb1VABMEDC6GTvFZPK6qz5sYKRcGZ0W6nMg=' 
WHERE 
  key_id = 'fcb7446bd8e283bb25df3644174805727b0485c5ecf84a7bc2f72eab9474f49b' 
  AND (
    token = 'zh/ZdHHTVb1VABMEDC6GTvFZPK6qz5sYKRcGZ0W6nMg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025